[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5653: 23.1; pdbtrack isn't parsing valid pdb output or creating an i
bug#5653: 23.1; pdbtrack isn't parsing valid pdb output or creating an interactive debugging buffer (python.el)
Fri, 26 Feb 2010 14:09:42 -0700
Python debugging with gud-pdb appears to be broken. There are actually two
1) While debugging Python code in emacs I kept seeing "Traceback cue not found"
errors popping up in the minibuffer. After a good bit of googling, I found
Once I applied this patch, those errors went away. Here is the patch:
--- a/python.el 2010-02-26 13:47:13.000000000 -0700
+++ b/python.el 2010-02-26 13:47:38.000000000 -0700
@@ -575,7 +575,7 @@
(defvar python-pdbtrack-is-tracking-p nil)
- "^> \\(.*\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_]+\\)()"
+ "^> \\(.*\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_<>]+\\)()"
"Regular expression pdbtrack uses to find a stack trace entry.")
(defconst python-pdbtrack-input-prompt "\n[(<]*[Pp]db[>)]+ "
2) Debugging Python in emacs doesn't work with "M-x pdb". If I invoke pdb
using "M-x pdb", I end up at a buffer that says:
Current directory is <pwd>
No matter what I do, the buffer never updates or creates an interactive pdb
shell until I kill the debugging session by running to the end of the script or
killing the debugger session. It's at this point I see exactly what I would
had expected to see in the first place, the pdb interactive session and its
output. The only way I can debug Python in emacs is to open a shell, invoke
"python -m pdb <file>". The good news is python.el has support to
automatically link the shell's pdb output to an editor pointing to the file
In the end, with the patch applied, I can debug by manually invoking pdb from a
shell buffer (M-x shell) but even with that patch applied, pdb (M-x pdb)
support fails to work as described earlier. I think issue #1 can be fixed with
the inline patch, as it does make it so you can debug Python in emacs where you
cannot without the patch being applied. Please let me know if there is more
information I can provide.
Emacs: 23.1.1 (http://emacsformacosx.com/)
OS: Mac OS X 10.6.2 (Snow Leopard)
In GNU Emacs 23.1.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
of 2009-08-16 on black.local
Windowing system distributor `Apple', version 10.3.1038
configured using `configure '--with-ns''
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: nil
value of $XMODIFIERS: nil
Major mode: Fundamental
Minor modes in effect:
M-x r e p o r t - e m a <tab> <return>
For information about GNU Emacs and the GNU system, type C-h C-a.
Jeremy Whitlock <address@hidden>
- bug#5653: 23.1; pdbtrack isn't parsing valid pdb output or creating an interactive debugging buffer (python.el),
Jeremy Whitlock <=