Using python 3.5.1
When I run the script using the python debug module:
[home]# python -m pdb myscript.py
This will start a debugging session:
> /somepath/to/myscript.py(1)<module>() -> import os (Pdb)
If I want to enter an interactive terminal from a debugging session, I can execute the interact command:
(Pdb) interact *interactive* >>>
Now I can interact with the code as if I were in a running interactive python mode, with access to any functions or variable in the script area working in the debugger, at the moment of entering the interact mode.
When I issue a command to exit interactive mode (to continue debugging), it kills the entire debugging session:
>>> exit() The program exited via sys.exit(). Exit status: None ....long nasty stack trace here.... [home]#
I also tried quit() and it also completes the debugger.
How can you exit interact mode without ending the entire debugging session? Is it possible?
Ideally, I would like to return to debug mode at the point where I stopped to continue my code.
python debugging pdb
Ray
source share