Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > pdb with emacs

Reply
Thread Tools

pdb with emacs

 
 
Yuri Shtil
Guest
Posts: n/a
 
      11-29-2004
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.


 
Reply With Quote
 
 
 
 
Heike C. Zimmerer
Guest
Posts: n/a
 
      11-30-2004
"Yuri Shtil" <(E-Mail Removed)> writes:

> 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
 
Reply With Quote
 
 
 
 
Benjamin Rutt
Guest
Posts: n/a
 
      12-01-2004
"Yuri Shtil" <(E-Mail Removed)> writes:

> 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 "$@"
--
Benjamin Rutt
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to change current working directory while using pdb within emacs duyanning Python 3 11-27-2007 07:21 AM
Palm::PDB: How to compose a PDB? Josef Moellers Perl Misc 0 08-16-2007 02:29 PM
Emacs PDB Windows Elric02@rogers.com Python 0 08-10-2007 01:20 AM
emacs python debugging: pydb or pdb fringe interaction Paul Rudin Python 4 05-18-2007 08:05 PM
Emacs and pdb after upgrading to Ubuntu Feisty levander Python 5 05-08-2007 08:36 PM



Advertisments