Remote Docker debugging fails with AttributeError
Describe the bug
Using pudb but in remote mode for docker debugging. When I try to telnet, I get the following:
pudb:6900: Please start a telnet session using a command like:
telnet 0.0.0.0 6900
pudb:6900: Waiting for client...
pudb:6900: Now in session with 192.168.65.1:56950.
FException ignored in: <function Debugger.__del__ at 0xffff6411dd80>
Traceback (most recent call last):
File "/wells-venv/lib/python3.10/site-packages/pudb/debugger.py", line 226, in __del__
if self._tty_file:
AttributeError: 'RemoteDebugger' object has no attribute '_tty_file'
On the telnet side all I get is this:
% telnet 127.0.0.1 6900
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
To Reproduce I followed steps found here to run pudb via docker (I've been able to run it a few times successfully but no idea why it stopped working):
https://github.com/isaacbernat/docker-pudb?tab=readme-ov-file
Expected behavior No errors thrown
Additional context
Versions pudb==2024.1.3 Python 3.10.12
Env variables used "PUDB_TERM_SIZE=80x24", "PUDB_RDB_PORT=6900", "PUDB_RDB_HOST=0.0.0.0", "PYTHONBREAKPOINT=pudb.remote.set_trace",
The only sense I can make of this traceback is that Debugger instance creation must have failed in __init__, which means there must be an error message prior to what you're showing that hints at the actual error. Your transcript shows an "F" before "Exception ignored", might this be from some testing framework that hid a prior exception?
Ah good catch! That sounds like the culprit. I'll see if I can resolve.