[ESS] debugging, mostly tracebug

Andreas Leha andreas.leha at med.uni-goettingen.de
Mon Apr 8 13:59:28 CEST 2013

Vitalie Spinu <spinuvit at gmail.com> writes:

>   >> Ross Boylan <ross at biostat.ucsf.edu>
>   >> on Fri, 05 Apr 2013 17:46:29 -0700 wrote:
> [...]
>  >> 
>  >> Unfortunately there is a long standing limitation in the ess-tracebug
>  >> that doesn't allow debuging from within a debug session. I plan to solve
>  >> that in a very near future.
>  > Do you mean ess-dbg-flag-for-debugging will not work if run from within the
>  > browser?  And does "will not work" mean debugging doesn't get put on, or that it
>  > does, but ess-tracebug loses the ability to follow the source
>  >> location?
> Oups, it actually works fine. The limitation is not as severe as I
> thought. C-c C-t d does not accept input that is not in the completion
> list, and that is not a biggie. The following will work fine:

Sorry to step in.
Would it be hard to change that?  For instance, I'd find it handy if
not-exported functions from a package would be 'visible' to a debugging
session in that package.  (Not very important, though, as I can call
debug() on them manually, of course)

And more general it would also be handy if local variables (as variables
defined in the debugging session) would appear in the completion list
during the debugging session.

But I don't want to ask for Christmas...

>    foo <- function(a = 4){
>        a <- boo()
>        print(a)
>    }
>    boo <- function(){
>        45
>    }
> Place a breakpoint in foo. Then in the debug session C-c C-t d to flag
> "boo" for the debugging. It will work.


>  > As Kasper pointed out, debugonce deals with the problem of permance, but I think
>  > the others remain, including the fact that you have to say debug or debugonce to
>  > step into a function, as opposed to issuing, say, a step command.  To clarify,
>  > when I say "can't step n steps forward" I mean all at once.  
> This is the editors task. Let's not mix it with R. I have this long in
> my todo list. Stepping into next call frame is on todo as well.

That is great news.  (I guess due to my limited
programming skills) that would be really helpful quite often.

(Maybe it'll be Christmas soon, after all....)


More information about the ESS-help mailing list