Subject: Re: 23.1; pdbtrack isn't parsing valid pdb output or creating an interactive debugging buffer (python.el)

From: Jeremy Whitlock <[email-masked]>
Date: Mon, 1 Mar 2010 16:46:03 -0700

> I can't reproduce this.  Could you attach a sample hello world type
> Python program, and a set of precise step-by-step instructions to
> reproduce the bug, starting with `emacs -Q'?  Thanks.

Step by step instructions
---------------------------------
1) Open emacs
2) Open a new file for editing (C-x C-f /tmp/test.py)
3) Input the following content:

import pdb

def editor_war():
    """ Print out your favorite text editor. """
    editor = 'emacs'

    pdb.set_trace()

    print('My favorite editor is %s!' % editor)

# editor_war

if __name__ == '__main__':
    editor_war()

4) Start pdb (M-x pdb <RET> pdb test.py)

With the given environment (Emacs 23.1.1, Python 2.6.1 and OS X 10.6.2), the pdb buffer (*gud-test.py*) gets created and displays "Current directory is /tmp/" with no interpreter or anything like that.  If I were to go through the exact same process in Emacs 22.1.1, the new pdb buffer (*gud-test.py*) would show the same "Current directory is /tmp/" but would then show me an interactive pdb prompt that has stopped execution at line 1.  Here is that buffer's output:

Current directory is /tmp/
> /private/tmp/test.py(1)<module>()
-> import pdb
(Pdb)

What also happens is my editing buffer for test.py is brought up and the debugging indicator shows up on line one.  I haven't had time to look into the Emacs code to deliver a patch for this but since the next step is proliferating the reproduction steps, I figured that would be a good start.  I'll look into the sources and see if I can't whip up a patch.  In the mean time, let me know if there is more information I can provide and/or if you've gotten a solution.

Jeremy Whitlock <[email-masked]>
http://www.thoughtspark.org