pdb with emacs

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Yuri Shtil

    #1

    pdb with emacs

    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.


  • Heike C. Zimmerer

    #2
    Re: pdb with emacs

    "Yuri Shtil" <yshtil@synopsy s.com> writes:
    [color=blue]
    > 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,[/color]

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

    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

    Comment

    • Benjamin Rutt

      #3
      Re: pdb with emacs

      "Yuri Shtil" <yshtil@synopsy s.com> writes:
      [color=blue]
      > 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.[/color]

      The source appears for me if I do C-c C-s immediately after startup.
      [color=blue]
      > 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.[/color]

      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

      Comment

      Working...