emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: [babel] Executing sh-code


From: Nick Dokos
Subject: Re: [Orgmode] Re: [babel] Executing sh-code
Date: Mon, 30 Nov 2009 11:02:09 -0500

Eric Schulte <address@hidden> wrote:

> Hi S=C3=A9bastien,
> 
> S=C3=A9bastien Vauban <address@hidden> writes:
> 
> [...]
> >
> > Just for my information (maybe being able to be more accurate next time, =
> or
> > even finding a solution myself), how do you debug such a problem?
> >
> > With which debugger, with tracing/stepping?  With stack trace?
> >
> 
> I'm almost embarrassed to admit that I do most of my elisp debugging
> with the `message' function.  I embed `message' debug statements to
> print the values of key variables at key points, and I run through
> problems looking at the output.
> 
> I'd be interested to hear if anyone can recommend a better elisp
> debugging solution.
> 

There are two methods that I use that I think are much more effective
than sprinkling message calls all over the place:

     o edebug-defun: (in emacs-lisp mode, C-u C-M-x) will mark the
     function so that when it is called, the interpreter stops and you can then
     single-step through it with <SPACE>. At each point, you can
     press "e" and evaluate variables (actually arbitrary expressions).

     o Insert a strategically placed (debug) call and then call the function.
     If/when the debug call is executed, you are dropped into the debugger
     and you can then evaluate arbitrary expressions.

HTH,
Nick





reply via email to

[Prev in Thread] Current Thread [Next in Thread]