On 12-10-09 12:12 AM, Worik R wrote:
I think I am whistling in the wind, but is there a modern symbolic
debugger for R programmes?

I am working through some  one else's code, thousands of lines, that
has the occasional bug in it, and a lot in my understanding of it.

I cannot make setBreakpoint or findLineNum  work.  I get "No source
refs found.".  I am starting to loose my mind!

You need to source the code with source references. That is the default for source(), but not for package installation. Set env variable R_KEEP_PKG_SOURCE=yes for command line installs; option(keep.source.pkgs=TRUE) for installs from within R.

Then you need to tell setBreakpoint where to look, through the "envir" arg. See the 2nd example in the help page.

A debugger where I could set breakpoints with a little more
granularity than the function level and a little more accessible than
the trace function.  What I ideally want is GDB for R.

I thought you said you wanted a modern debugger :-). GDB is very 80ish. I'm unaware of any debuggers that I would consider "modern", i.e. like the debuggers from the 90s, but there are a number of pre-modern choices that others have mentioned, and I don't think anyone has mentioned the debug package.

Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to