ess and debug package
Stephen Eglen
stephen at inf.ed.ac.uk
Mon Feb 2 14:11:14 CET 2004
Dear Mark,
> Thanks for the report. I'd suggest trying 'options(
> debug.command.recall=FALSE)' before running the debugger (perhaps
> in '.First')-- please let me know if this works.
Thanks, that helps. The following sequence now works under ESS for
me:
library(debug)
options( debug.command.recall=FALSE)
mtrace(glm)
glm(stupid.args)
now the Tk window appears, with D(1)> in the ESS window.
> I've never had any joy with emacs, and I haven't been able to test
> debug under ESS, so I'd particularly appreciate feedback if (when)
> there are problems. The doco for 'savehistory' says "doesn't work
> in batch use of Rterm" which I guess may be ESS's modus
> operandi.
Yes, Martin Maechler pointed this out to me in response to my email,
that since ESS uses "R --no-readline", there will be no readline
history.
> Is it the case that 'interactive()' returns FALSE in ESS?
> If so, I can patch the debug code easily.
Unfortunately not:
> interactive()
[1] TRUE
One way to test whether R is running under ESS is to check the value
of the STERM option, since ESS sets this:
> options("STERM")
$STERM
[1] "iESS"
[Although we had some debate a while ago about changing the exact
value of STERM.] Let me know if you want any new versions tested
under ESS.
As an aside, when I saw your package announcement, my immediate
thought was whether we could make use of an Emacs window (rather than
a Tk window) to show the function being debugged. Emacs already has
similar support for other programming environments (e.g running gdb
under C, lisp debugger). But that's a low priority for now!
best wishes,
Stephen
More information about the ESS-help
mailing list