Here are a couple of quick ideas, which may or may not be easy to implement
in R (and may or may not already be implemented in ESS - I am a bit behind)

1) Add an R function like "next" in the debugger, but which is really "next
and descend"
2) Add a ESS functionality that adds a debug flag to every function inside
a package namespace (perhaps including .GlobalEnv), assuming that you do
not want to debug functions outside of your own package (which I sometimes
need to do though).

Kasper


On Sat, Mar 15, 2014 at 3:25 PM, Vitalie Spinu <spinuvit@gmail.com> wrote:

>
> How about `ess-debug-flag-temporary-for-debugging`. It will work as
> `ess-debug-flag-for-debugging` on the object at point, and when the
> debugger is exited the function will be automatically un-debugged.
>
>   Vitalie
>
>  >>> Andreas Leha on Sat, 15 Mar 2014 09:59:36 +0100 wrote:
>
>  > Vitalie Spinu <spinuvit@gmail.com> writes:
>  >> >>> Andreas Leha on Fri, 14 Mar 2014 23:49:06 +0100 wrote:
>  >>
>  >> > Hi all,
>  >> > lets say I debug function a() which calls function b() and I want to
>  >> > step into b() during the debugging session.
>  >>
>  >> > In this situation I can flag b() for debugging also during the active
>  >> > debugging session, which is great.  But if I want to follow control
> into
>  >> > some deeply nested function, that becomes cumbersome - despite all
> the
>  >> > support by ess (ess-debug-flag-for-debugging, ...)
>  >>
>  >> > So, my question is:  Is there even more support by ess?  The most
>  >> > straight forward support IMO would be a key-stroke to sth like
>  >> > ess-debug-command-next-and-step-into that would automatically flag
> b()
>  >> > for debugging before executing ess-debug-command-next (and also
> undebug
>  >> > it automatically again).
>  >>
>  >> > Is that possible (or even already implemented)?
>  >>
>  >> Possible? Yes. Implemented in ESS? No. Implemented in R. To the best of
>  >> my knowledge not. If you can think of how to implement this in R. Then,
>  >> adding it to ESS is straightforward.
>  >>
>
>  > Well, I think the main difficulty is to determine which function to
>  > debug, as functions can be called in too many ways.  Obvious and simple
>  > examples are do.call() or apply().  Or also 'x <- b(10)' where probably
>  > not '<-' but 'b()' is to be debugged.
>
>  > There are also undecidable cases, like 'x <- a(10, b(100))' where ess
>  > would have difficulties to tell whether a() ore b() are to be debugged
>  > next.
>
>  > Maybe a good interface would be to provide a list of function calls in
>  > the next 'line' to the user to decide (while omitting functions like
>  > '+', apply(), ...).
>
>  > Without too much thought (and in absence of much/any knowledge in that
>  > field) I had something like this in mind:
>
>  > If the next line to execute by ess-debug-command-next is 'b(10)' then
>  > ess could run 'debug(quote(b(10))[[1]])' prior to sending the line to R
>  > (and undebug afterwards).
>
>  > All in all, such feature would be cool, but since I can flag function
>  > for debugging manually it is definitely not a must-have.
>
>  > Regards,
>  > Andreas
>
>  > ______________________________________________
>  > ESS-help@r-project.org mailing list
>  > https://stat.ethz.ch/mailman/listinfo/ess-help
>
> ______________________________________________
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

	[[alternative HTML version deleted]]

