pdb with emacs

Y

Yuri Shtil

Hi,

I am trying to learn python and use the gud/pdb from emacs. The
functionality that I am used to under gud/gdb and gud/perldb is missing, or
I don't know how to make it work.
Specifically: when I start pdb on a script file, the source does not show in
an another window as it does with perldb and gdb. If I bring it up in an
another window,
the ^X SPC set a break, but the subsequent gud-next commands do not move the
execution cursor in the source file window.

Any help will be greatly appreciated.
 
H

Heike C. Zimmerer

Yuri Shtil said:
I am trying to learn python and use the gud/pdb from emacs. The
functionality that I am used to under gud/gdb and gud/perldb is missing, or
I don't know how to make it work.
Specifically: when I start pdb on a script file, the source does not show in
an another window as it does with perldb and gdb. If I bring it up in an
another window,

Your source will show up when you step into your program, e.g. by
doing an "S" pdb command.
the ^X SPC set a break, but the subsequent gud-next commands do not move the
execution cursor in the source file window.

I never use gud's commands while in pdb mode because they didn't work
- at least not as I expected - and I've already been familiar with pdb
syntax. You'd better use pdb commands in its debugger window.


Greetings,

Heike
 
B

Benjamin Rutt

Yuri Shtil said:
I am trying to learn python and use the gud/pdb from emacs. The
functionality that I am used to under gud/gdb and gud/perldb is missing, or
I don't know how to make it work.
Specifically: when I start pdb on a script file, the source does not show in
an another window as it does with perldb and gdb.

The source appears for me if I do C-c C-s immediately after startup.
If I bring it up in an another window, the ^X SPC set a break, but
the subsequent gud-next commands do not move the execution cursor in
the source file window.

I can in general set breakpoints using C-x SPC in the source buffer
after the source appears, which will be hit after I resume
execution. So I guess I don't observe your problems. I am using a
custom "pdb" executable script though, maybe this helps:

#!/bin/sh
exec python $HOME/opt/python-2.3/lib/python2.3/pdb.py "$@"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top