[R] Eclipse/Statet: How to set breakpoints

Duncan Murdoch murdoch at stats.uwo.ca
Wed Jul 30 13:53:43 CEST 2008


On 7/30/2008 7:15 AM, el_eli at gmx.de wrote:
> Hi Duncan,
> thank you for your fast answering. Is there any function implemented in 
> R to "stop" it?
> (something like q() but i only want to stop a script not shutdown the 
> whole R-console at a certain point)
> That would be a good alternative for  breakpoints in Eclipse...

A call to browser() will pause execution, let you examine and change 
local variables, etc.

A few years ago I put together a web page of debugging tips; it's still 
online at www.stats.uwo.ca/faculty/murdoch/software/debuggingR.  I think 
most of the information is still current, though I haven't reviewed it 
in a while.

Duncan Murdoch

> Best,
> Eli
> 
> 
> 
> Duncan Murdoch schrieb:
>> On 30/07/2008 4:28 AM, el_eli at gmx.de wrote:
>>> Hi,
>>> I'm using the IDE Eclipse with the Statet-Plugin to develop R-code.
>>> Is there a possibility to set breakpoints for debugging in R-script 
>>> files
>>> (just like in Java-code)?
>>
>> I believe the answer is no, but R does contain (some of?) the 
>> necessary infrastructure to add that.  It will just take some time, 
>> and some happy coincidences.  (I don't know StatET, so I'll need to 
>> learn what it needs.)
>>
>> Duncan Murdoch
>>



More information about the R-help mailing list