[R] debug R code

Duncan Murdoch murdoch.duncan at gmail.com
Sat Jun 4 00:13:22 CEST 2011


On 11-06-03 4:49 PM, Hui Du wrote:
> Hi List,
>
>                 I have a question regarding debug R code. I know I can use debug(fuction_name) and when code runs to that point, it will go to debugger. My question is inside debugger, how to stop a code at a specified line. For example, in C (gdb or dbx debugger) I can run "stop at 123" (stop at line 123) or 'b 123' (break at line 123). Is there any similar commend in R debugger?
>
>

See ?setBreakpoint.

You can set a breakpoint from within the browser, or before you run your 
function.  ?trace gives full details on all the (many) options.

Duncan Murdoch



More information about the R-help mailing list