Skip to content

web_pdb hangs at page load #68

@vadimkantorov

Description

@vadimkantorov

Apparently because of server hangs at some variable formatting:

I waited a few dozen seconds and then hit Ctrl+C and got somehow this stack trace:

  File "/usr/lib/python3.10/bdb.py", line 90, in trace_dispatch
    return self.dispatch_line(frame)
  File "/usr/lib/python3.10/bdb.py", line 114, in dispatch_line
    self.user_line(frame)
  File "/usr/lib/python3.10/pdb.py", line 253, in user_line
    self.interaction(frame, None)
  File "/usr/lib/python3.10/pdb.py", line 348, in interaction
    self._cmdloop()
  File "/usr/lib/python3.10/pdb.py", line 317, in _cmdloop
    self.message('--KeyboardInterrupt--')
  File "/usr/lib/python3.10/pdb.py", line 448, in message
    print(msg, file=self.stdout)
  File "/home/vadimkantorov/.local/lib/python3.10/site-packages/web_pdb/web_console.py", line 152, in writeline
    frame_data = self._debugger.get_current_frame_data()
  File "/home/vadimkantorov/.local/lib/python3.10/site-packages/web_pdb/__init__.py", line 174, in get_current_frame_data
    'locals': self.get_locals()
  File "/home/vadimkantorov/.local/lib/python3.10/site-packages/web_pdb/__init__.py", line 214, in get_locals
    return self._format_variables(self.curframe_locals)
  File "/home/vadimkantorov/.local/lib/python3.10/site-packages/web_pdb/__init__.py", line 189, in _format_variables
    return '\n'.join(sorted(f_vars))
KeyboardInterrupt

Maybe some variables are super-huge strings, and it tries to format them and thus hanging?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions