Debugger Confusion

R Toop toop82 at comcast.net
Sat Jul 16 15:30:49 EDT 2005


By now, you have probably found an IDE that gives you satisfactory
debugging.
I think your original problem was trying to use an emacs shell (M-x shell)
to run Python interpreter.
But the emacs Python mode works a whole better than Python in a dumb
terminal.

Have you tried the following?
-- open Python source file in emacs
-- expect to see that the buffer is in Python mode, so when you select it,
"Python" appears on the modeline and the emacs menu bar, and describe-mode
gives mucho info.
-- from the emacs Python menu (or Xemacs right click to get Python popup),
select "Start interpreter", or just  C-c !  keys.
-- again from Python source buffer, selectPython "Execute buffer" or C-c C-c
keys.
-- if the source has pdb.set_trace() as previous post suggested, the
interpreter buffer will stop there, and in fact pdb.py will appear in
another emacs buffer.
-- in the interpreter, type n Enter
--now you'll see the desired pointer in a temp copy of your Python source or
whatever imported Python library you find yourself.

With emacs/Python syntax highlighting (M-x font-lock-fontify-buffer), it's
not bad.
The one true editor is always worth the effort     :)
HTH.

"Rex Eastbourne" <rex.eastbourne at gmail.com> wrote in message
news:1120059632.832595.245480 at g47g2000cwa.googlegroups.com...
> One thing: is it possible to go through the code within emacs? Doing it
> on the command line is useful, but it would be very helpful if I could
> have a little marker within the emacs buffer that showed me where I am.
>
> Rex
>




More information about the Python-list mailing list