'Use same session for successive set_trace calls with remote_pdb
I'm writing python code that uses multiprocessing. From what I can tell, even when I'm testing with a single thread I need to use remote_pdb in order to do debugging. That seems to work just fine. I've added these environment variables:
export REMOTE_PDB_HOST=127.0.0.1
export REMOTE_PDB_PORT=4444
export PYTHONBREAKPOINT=remote_pdb.set_trace
Then inside my code (python 3.6, so that last variable above isn't useful yet) I write import remote_pdb; remote_pdb.set_trace(). After that I have an alias set up that calls in another terminal rlwrap nc -C 127.0.0.1 444 (rlwrap due to some bug where I'm not getting readline support in nc).
This all is working great. But here's my problem. After I enter the debugging and find that the current iteration is okay I want to continue. I press c, and then the next time my code hits the set_trace line it starts a new remote session. I have to CTRL-C out of my current nc session and call it again.
Is there any way to make successive calls to set_trace just work within the existing nc session?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
