T
tron.thomas
I am trying to figure out how to use the pdb module to debug Python
programs, and I'm having difficulties. I am pretty familiar with GDB
which seems to be similar, however I cannot even get the Python
debugger to break into a program so I can step through it. I wrote a
simple program and below is an example of the steps I tried, as well as
the results I got:
Breakpoint 1 at MyProgram.py:8
(Pdb) cont
The program should have printed a message to the screen when execution
was continued, and it should have hit the breakpoint during that
execution. Instead the debugger exitted to the main prompt.
What is the reason the dubugger behaves like this?
What is the correct way to accomplish what I am trying to do?
I have tried this process on Python 2.3.5 and 2.4.3 with the same
results on each version.
programs, and I'm having difficulties. I am pretty familiar with GDB
which seems to be similar, however I cannot even get the Python
debugger to break into a program so I can step through it. I wrote a
simple program and below is an example of the steps I tried, as well as
the results I got:
(Pdb) b MyProgram.MyClass.method<string>(1)?()
Breakpoint 1 at MyProgram.py:8
(Pdb) cont
The program should have printed a message to the screen when execution
was continued, and it should have hit the breakpoint during that
execution. Instead the debugger exitted to the main prompt.
What is the reason the dubugger behaves like this?
What is the correct way to accomplish what I am trying to do?
I have tried this process on Python 2.3.5 and 2.4.3 with the same
results on each version.