debugging R

Liaw, Andy andy_liaw at
Sat Mar 20 22:46:45 CET 2004

GDB (and GUD, I believe) are for debugging _compiled_ code.  R code is
_interpreted_.  GDB can be used to debug R itself, or C/Fortran code
dynamically loaded into R.  For debugging R code, you can start by reading
?debug and/or ?browser.  There's a `debug' package on CRAN that offers more
debugging facilities.


> From: Fred J.
> Hello
> I have some lines of code I wish to debugg. so I type
> in the ehco area M-x gdb <Enter> I get 
> Run gdb on file: C:/somedir/file.R/sourcecodefile.R
> I get
> NO such file or directory, gdb
> what am I doing wrong?
> I am trying to follow this but I need more explanation
> on what it means
> "
> A third option is to start an inferior R process via
> ESS (M-x R) and then start GUD (M-x gdb) giving the R
> binary (using its full path name) as the program to
> debug. Use the program ps to find the process number
> of the currently running R process then use the attach
> command in gdb to attach it to that process. One
> advantage of this method is that you have separate *R*
> and *gud-gdb* windows. Within the *R* window you have
> all the ESS facilities, such as object-name
> completion, that we know and love. 
> "
> it says I have to give R binary, well the
> filesourcecode.R is a text file, what then?
> and how do I do this ps + attaching the command thing?
> thanks
> ______________________________________________
> ESS-help at mailing list

Notice:  This e-mail message, together with any attachments,...{{dropped}}

More information about the ESS-help mailing list