From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Z Newsgroups: gmane.emacs.help Subject: Re: How to render gud (python debugger) output? Date: Fri, 5 Oct 2012 17:29:30 -0700 (PDT) Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1349483414 10587 80.91.229.3 (6 Oct 2012 00:30:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Oct 2012 00:30:14 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 06 02:30:20 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TKIHc-00050K-0S for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Oct 2012 02:30:20 +0200 Original-Received: from localhost ([::1]:54061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKIHW-0001wY-3w for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Oct 2012 20:30:14 -0400 Original-Received: by 10.68.233.137 with SMTP id tw9mr718549pbc.6.1349483370976; Fri, 05 Oct 2012 17:29:30 -0700 (PDT) Original-Received: by 10.68.197.70 with SMTP id is6mr3610578pbc.14.1349483370957; Fri, 05 Oct 2012 17:29:30 -0700 (PDT) Original-Path: usenet.stanford.edu!kt20no11492158pbb.1!news-out.google.com!g9ni23679pbh.1!nntp.google.com!kr7no6270731pbb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=114.91.109.41; posting-account=0SDsjAoAAACST9_yxvTp0Bl9-m-EasZx Original-NNTP-Posting-Host: 114.91.109.41 User-Agent: G2/1.0 Injection-Date: Sat, 06 Oct 2012 00:29:30 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:194765 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87100 Archived-At: On Friday, October 5, 2012 4:40:03 PM UTC+8, Eli Zaretskii wrote: > > Date: Fri, 5 Oct 2012 01:30:19 -0700 (PDT) > > > From: Z > > > Injection-Date: Fri, 05 Oct 2012 08:30:19 +0000 > > > > > > I use gud pdb to debug Python program. But output of gud is mono color > > > and hard to identify the information in a huge chuck of > > > output(e.g. type "bt" and find current frame in stack). So I want to add color and link to the output. > > > > > > How to render gud output? What function shall I add or change? > > > > Did you try the command below? > > > > M-x gdb-many-windows RET > > > > You can also invoke it by clicking "Gud->GDB-MI->Display Other Windows" > > from the menu bar. > > > > This causes the call stack be automatically displayed in a separate > > window, with clickable frames. So you should not need to examine the > > output of "bt" manually, if you don't want to. Eli, thank you. I prefer command line debug without so many windows open. Besides, gdb-many-windows() seems not callable in gud-pdb mode, maybe it's only available in gud-gdb mode. And I have gone through gud code and found supports for other debuggers except gdb are rudimentary. So I add the code to .emacs to highlight/hide python debugger outputs. (add-hook 'pdb-mode-hook (lambda () (progn (hi-lock-face-buffer "^-> +.+$\\|^.+pdb\\.py.+$\\|^.+bdb\\.py.+$" 'org-hide) (hi-lock-face-buffer "^> [-a-zA-Z0-9_/.:\\]*([0-9]+)" 'bold) )))