pdbtrack in emacs, Great!

Syver Enstad syver-en at online.no
Tue Nov 27 10:08:44 EST 2001


Mark Johnathan Greenaway <mark at knobbits.org> writes:

> May I ask what version of emacs and what version of python-mode
> you're using?

You may :-) It's 21.1 and (defconst py-version "4.6"
  "`python-mode' version number.") that I've downloaded from www.python.org


> Also, how do you start pdb? I've tried to use pdb under emacs and it always
> seems to stall?
> 

Yes on my machine it's terrible, never gotten it to work. 

But pdbtrack is great, start up a python interpreter with C-c! and
import pdb (put it in your pythonstartup file) put a pdb.set_trace()
statement in the sourcefile you wish to debug. Call a function that
will bring the execution to the set_trace call. When pdb.set_trace is
called the pdbtrack feature breaks in and shows the overlay arrow in
the fringe, and you can write pdb commands in your *Python* buffer.

Of course, you could have done that anyway, the difference being that
the sourcefile being debugged is displayed together with the arrow
showing the location of the instruction pointer).

I've made some extensions to the py-shell-keymap together with some
simple lisp functions that enables me to control the most common
functionality with the function keys that I am used to from VC++
Devstudio which is the debugger I like the most. I am currently
working on enabling and disabling breakpoints directly from the
sourcecode, enabling is ok, but disabling it needs a little more
attention.


-- 

Vennlig hilsen 

Syver Enstad



More information about the Python-list mailing list