10

I am a happy user of ESS for coding and debugging R code. I have found a elusive bug recently deeply inside several for loops and ifs structures.

Is there any way of having ESS selectively travel the if/else structures or loop for all the values in a for loop?.

Does R or ESS have debugger mode where you can skip else clauses, loop the values and step into, step through, return etc?

[UPDATE]

Thanks @jubba for the link to the other SO question about debugging tools for R-language. At the end this was my real question. This other thread give the links for the kind of things that I wanted to know about the way of doing debugging in the current R.

Community
  • 1
  • 1
Pablo Marin-Garcia
  • 4,151
  • 2
  • 32
  • 50
  • I have not put this question as a duplicate because I don't know how to do it, I hope to remember to google for it later ;-) – Pablo Marin-Garcia Feb 27 '11 at 08:27
  • 1
    New version of [ess-tracebug](http://code.google.com/p/ess-tracebug/) is available. It includes plenty of new cool features like watch window, debug/undebug on the fly of functions and methods. It also includes an interactive recover mode which makes it easy to navigate during the recover or dumped frames. – VitoshKa Mar 01 '11 at 18:58
  • here is the today's announcement: https://stat.ethz.ch/pipermail/ess-help/2011-March/006718.html – VitoshKa Mar 01 '11 at 19:09

1 Answers1

7

There has been a more general question about debugging in R on Stackoverflow :

Debugging tools for the R language

One answer by Davor Cubranic points to ess-tracebug which is, according to its website, "An emacs package for interactive debugging and error tracing in ESS". I've never used it myself, but it may be useful to you :

http://code.google.com/p/ess-tracebug/

Community
  • 1
  • 1
juba
  • 47,631
  • 14
  • 113
  • 118
  • Thanks for the link to the other [question](http://stackoverflow.com/questions/1169480/debugging-tools-for-the-r-language). It give the links for the kind of things that I wanted to know about the way of doing debugging in the current R. [R-debug-tools.pdf](http://www.biostat.jhsph.edu/%7Erpeng/docs/R-debug-tools.pdf) and [debuggingR](http://www.stats.uwo.ca/faculty/murdoch/software/debuggingR/) and the one you provided – Pablo Marin-Garcia Feb 26 '11 at 15:13