Remote Docker debugging fails with AttributeError
- Dominant language
- Python
- Stars
- 3.2k
- Forks
- 245
- Avg merge
- 13m
- Merged PRs (30d)
- 5
Description
**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:
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",
Contributor guide
No contributing guide indexed for this repository
Research direction
The traceback points to pudb/debugger.py at Debugger.__del__; start there and reproduce the remote Docker session with the listed PUDB_RDB_* settings and PYTHONBREAKPOINT. Done means RemoteDebugger cleanup no longer raises AttributeError and the telnet client reaches a usable debugging session. No test file is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100