[Python-Dev] Enhancement to pdb in gud.el (original) (raw)

Nick Roberts nick at nick.uklinux.net
Thu Sep 18 14:04:00 EDT 2003


Hi,

I've written a mode (gdb-ui.el) which is in the Emacs CVS repository (http://savannah.gnu.org/projects/emacs) that displays breakpoint icons in the display margin of Emacs when debugging with GDB. I can almost do the same thing for pdb (the Emacs interface to the python debugger in gud.el).

Breakpoints in GUD can be set/cleared using the toolbar and it is easy to write a lisp function to do that. However, they can also be set/cleared from the GUD buffer with break/clear and gud-pdb-marker-filter is the best place to detect this.

If I'm using pdb.py to debug fib.py and I type:

(Pdb) b 4

I get the message:

Breakpoint 1 at /home/nick/python/fib.py:4

and I can use gud-pdb-marker-filter to detect this string and insert a breakpoint icon at the appropriate line in the source buffer.

Typing 'clear 1' gives Deleted breakpoint 1' and typing 'clear fib.py:4' gives no message and can't be detected. If, in both cases, the the message is modified to somthing like

Deleted breakpoint 1 at /home/nick/python/fib.py:4

then I would have enough information.

Anyone interested?

Nick



More information about the Python-Dev mailing list