unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to render gud (python debugger) output?
@ 2012-10-05  8:30 Z
  2012-10-05  8:40 ` Eli Zaretskii
       [not found] ` <mailman.10336.1349426401.855.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Z @ 2012-10-05  8:30 UTC (permalink / raw)
  To: help-gnu-emacs

Hi members,

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?

Thank you very much,
Z


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to render gud (python debugger) output?
  2012-10-05  8:30 How to render gud (python debugger) output? Z
@ 2012-10-05  8:40 ` Eli Zaretskii
       [not found] ` <mailman.10336.1349426401.855.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2012-10-05  8:40 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Fri, 5 Oct 2012 01:30:19 -0700 (PDT)
> From: Z <zhushenli@gmail.com>
> 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.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to render gud (python debugger) output?
       [not found] ` <mailman.10336.1349426401.855.help-gnu-emacs@gnu.org>
@ 2012-10-06  0:29   ` Z
  0 siblings, 0 replies; 3+ messages in thread
From: Z @ 2012-10-06  0:29 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: help-gnu-emacs

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 <zhushenli@gmail.com>
> 
> > 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)
            )))
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-06  0:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-05  8:30 How to render gud (python debugger) output? Z
2012-10-05  8:40 ` Eli Zaretskii
     [not found] ` <mailman.10336.1349426401.855.help-gnu-emacs@gnu.org>
2012-10-06  0:29   ` Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).