On Mon, 13 Feb 2006, Heikki Toivonen wrote:

The simplest way to debug something with pdb, if you know where to put
the breakpoint, is to add one line of code near it: 'import pdb;
pdb.set_trace()' and a command line debugger, like gdb, appears when the

Yeah, this is the same hack that has been suggested for WingIDE, and I
am looking for something better.

It's not about command line vs GUI.

Then what is it about ?
If it is changing the code to set a breakpoint that bothers you then you can use the more common - but slower - way which is to start the process in pdb and set a breakpoint using the 'break' command as you'd do in gdb before running the program.

Normally, when you debug a C program you don't go around adding signal calls to enter the debugger because recompiling and rebuilding takes a while. This being python, it's not an issue, changing code to set a breakpoint is as fast, if not faster, than the 'break' command way.

A while ago, I changed the RunPython script to do this if you set the PDB env var: PDB=1 release/RunChandler -c will bring you to a 'pdb' prompt from where you can set breakpoints and then start the program. I believe I only did this for the Mac version but the same could be done for the others.

Andi..
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "Dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/dev

Reply via email to