pdb with emacs

Discussion in 'Python' started by Yuri Shtil, Nov 29, 2004.

  1. Yuri Shtil

    Yuri Shtil Guest

    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.
    Yuri Shtil, Nov 29, 2004
    #1
    1. Advertising

  2. "Yuri Shtil" <> 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
    Heike C. Zimmerer, Nov 30, 2004
    #2
    1. Advertising

  3. "Yuri Shtil" <> 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
    Benjamin Rutt, Dec 1, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. levander
    Replies:
    5
    Views:
    465
    Patricia J. Hawkins
    May 8, 2007
  2. Paul Rudin
    Replies:
    4
    Views:
    527
    Paul Rudin
    May 18, 2007
  3. Emacs PDB Windows

    , Aug 10, 2007, in forum: Python
    Replies:
    0
    Views:
    366
  4. duyanning
    Replies:
    3
    Views:
    642
    R. Bernstein
    Nov 27, 2007
  5. Josef Moellers

    Palm::PDB: How to compose a PDB?

    Josef Moellers, Aug 16, 2007, in forum: Perl Misc
    Replies:
    0
    Views:
    142
    Josef Moellers
    Aug 16, 2007
Loading...

Share This Page