It is also to possible enter the debugger after a crash or traceback
even though the program was not started via pydb
. This is
called post-mortem debugging. In this state many of the
debugger commands for examining variables and moving around in the
stack will still work. However some commands such as those which imply
a continuation of running code will no longer work.
There are in fact three possibilities. The first way does not require
modification to your program but it does require that the program be
run from the Python interpreter shell. The second possibility doesn't
require one to be inside the Python interpreter shell, but does
require modification to your program. The third possibility is if you
had started using pydb
.