tracebug and developer mode are fantastic additions to ESS.

And yes, you can work inside a namespace.
C-c C-t C-a mypackagename
runs the command ess-developer-add-package

This lets you put the revised function inside the namespace.

My working pattern is to put the breakpoint in the function just before the
current
problematical statement and then single-line C-c C-n from there.  I can
experiment inside
a function until I am happy enough to enter Q
and then C-c C-c the next revision of the function, with the breakpoint (if
any) somewhere else.

Rich


On Thu, Apr 4, 2013 at 8:47 PM, Kasper Daniel Hansen <
kasperdanielhansen@gmail.com> wrote:

> I have not used tracebug, although I have it on my todo list to check it
> out.  But a few other comments, unrelated to this package
>
> You can debugonce() for debugging a single time.  Also, if you read in a
> function definition anew, the debug flag gets removed.  And for inserting
> code (like browser()) into another function, you should check out trace().
>
> I do agree that the debugging facilities could be better (or at least the
> ones I use).
>
> Kasper
>
>
> On Thu, Apr 4, 2013 at 8:11 PM, Ross Boylan <ross@biostat.ucsf.edu> wrote:
>
> > I just tried ess-tracebug with ESS 12.09-1.
> >
> > I had hoped that the package would let me position breakpoints on the
> fly,
> > but it seems not to work that way.  Instead you insert breakpoints into a
> > source file and then read it in.  This means you can not set a breakpoint
> > at a new location while in a debugging session, and also that you must
> > clear the breakpoints before "really" saving the file (e.g., a VCS
> commit).
> >  Is my understanding correct, or is there a better way?
> >
> > Is the enable/disable breakpoints a half way house, so that one can
> enable
> > and disable on the fly, or does that require rereading the source too?
> >
> > I followed the instructions at http://code.google.com/p/ess-**tracebug/<
> http://code.google.com/p/ess-tracebug/>,
> > hoping that it would magically realize that the code I was fiddling with
> > was in a package/namespace.  Seemingly it did not.
> >
> > Vitalie Spinu previously ("developing packages with namespaces" around
> Feb
> > 6) recommended using ess-developer, and Barry Rowlingson suggested
> > devtools.  Can either of those be combined with ess-tracebug?
> >
> > I'm  not sure how R got this far with such minimal debugging facilities.
> >  As far as I know, one can't step into a function (without first saying
> > debug(function), which is permanent), can't step n steps forward, and
> can't
> > add and remove breakpoints on the fly.  Or am I missing something?
> >
> > Ross Boylan
> >
> > ______________________________**________________
> > ESS-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/**listinfo/ess-help<
> https://stat.ethz.ch/mailman/listinfo/ess-help>
> >
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

	[[alternative HTML version deleted]]

