From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jeremy Whitlock Newsgroups: gmane.emacs.bugs Subject: bug#5653: 23.1; pdbtrack isn't parsing valid pdb output or creating an interactive debugging buffer (python.el) Date: Fri, 26 Feb 2010 14:09:42 -0700 Message-ID: <24C18CE3-781E-4F0E-8907-F73A24A1D3C1@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1267368728 23691 80.91.229.12 (28 Feb 2010 14:52:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 28 Feb 2010 14:52:08 +0000 (UTC) To: 5653@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 28 15:52:02 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NlkUY-0002af-Dt for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Feb 2010 15:52:01 +0100 Original-Received: from localhost ([127.0.0.1]:58812 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NlkUS-0003Pc-5V for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Feb 2010 09:51:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nl7ed-000085-9c for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2010 16:23:23 -0500 Original-Received: from [140.186.70.92] (port=34330 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nl7eb-00007w-It for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2010 16:23:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nl7ea-00060H-Ua for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2010 16:23:21 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36981) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nl7ea-00060D-QL for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2010 16:23:20 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Nl7XW-0004hV-N4; Fri, 26 Feb 2010 16:16:02 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Jeremy Whitlock Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Feb 2010 21:16:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: report 5653 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.126721890618046 (code B ref -1); Fri, 26 Feb 2010 21:16:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Feb 2010 21:15:06 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nl7Wc-0004h1-4J for submit@debbugs.gnu.org; Fri, 26 Feb 2010 16:15:06 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nl7Rj-0004dY-4Z for submit@debbugs.gnu.org; Fri, 26 Feb 2010 16:10:05 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]:51762) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nl7Rf-0001ik-10 for submit@debbugs.gnu.org; Fri, 26 Feb 2010 16:09:59 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nl7Rb-00015O-5H for submit@debbugs.gnu.org; Fri, 26 Feb 2010 16:09:58 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:42860) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Nl7Ra-00015G-UV for submit@debbugs.gnu.org; Fri, 26 Feb 2010 16:09:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nl7Ra-000533-8i for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2010 16:09:54 -0500 Original-Received: from [140.186.70.92] (port=36674 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nl7RY-00052o-TM for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2010 16:09:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nl7RV-0004zt-BA for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2010 16:09:52 -0500 Original-Received: from mail-pw0-f41.google.com ([209.85.160.41]:44572) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nl7RV-0004zT-4g for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2010 16:09:49 -0500 Original-Received: by pwj7 with SMTP id 7so365155pwj.0 for ; Fri, 26 Feb 2010 13:09:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:content-type :content-transfer-encoding:subject:date:message-id:to:mime-version :x-mailer; bh=h//RW7xJwxmIQi/u6wq7pVu1FsGpv1MAoe/ZchI48zc=; b=xO/klG/bK9NBqL7GBdI7k2ER7Ntv9PBFHI2Dm++eeGhPaP9gllOQl20kgnZiDGFWqk ZNuIlSP4htIXrC2ZjPUKjckFVLd1f6aB6sbdaCoKyvTVFi9P9ZleEoy+ZZfUrZIXWMLp DaLiNAM1BkXeH9fxEdmRz1qW7Qcj9kHuug21Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=Of5+o89wTEOpxSkGPhyypF5Ezks8sqySqF517ETnlgk36F/vV53ZG9rrReecmqBU0G bmV/j16E/MfCk2sbpSViEoPQ5/l/QJyS6wPqhrtrVZbgRyiEXqqdIHbuedzUW36hfghu WvV4vP360UBWQZHyBGxSHOUqxgZFrkXYZtDMg= Original-Received: by 10.142.119.42 with SMTP id r42mr527202wfc.188.1267218586084; Fri, 26 Feb 2010 13:09:46 -0800 (PST) Original-Received: from ?192.168.0.10? (71-212-153-66.hlrn.qwest.net [71.212.153.66]) by mx.google.com with ESMTPS id 21sm371669pzk.12.2010.02.26.13.09.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 26 Feb 2010 13:09:44 -0800 (PST) X-Mailer: Apple Mail (2.1077) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Fri, 26 Feb 2010 16:15:05 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 26 Feb 2010 16:16:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Sun, 28 Feb 2010 09:51:22 -0500 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35355 Archived-At: Python debugging with gud-pdb appears to be broken. There are actually = two problems: 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 this: https://bugs.launchpad.net/python-mode/+bug/505295 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) (defconst python-pdbtrack-stack-entry-regexp - "^> \\(.*\\)(\\([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 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 ". The good news = is python.el has support to automatically link the shell's pdb output to = an editor pointing to the file being debugged. 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. Environment Information --------------------------------- Emacs: 23.1.1 (http://emacsformacosx.com/) OS: Mac OS X 10.6.2 (Snow Leopard) Python: 2.6.1 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'' Important settings: 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 locale-coding-system: nil default-enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: show-paren-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x r e p o r t - e m a Recent messages: Loading = /Users/jwhitlock/.emacs.d/color-theme/themes/color-theme-example.el = (source)...done Loading = /Users/jwhitlock/.emacs.d/color-theme/themes/color-theme-library.el = (source)...done Loading /Users/jwhitlock/.emacs.frameg...done For information about GNU Emacs and the GNU system, type C-h C-a. Jeremy Whitlock http://www.thoughtspark.org