[R] browser always enters debug mode

Duncan Murdoch murdoch.duncan at gmail.com
Wed Apr 9 01:45:17 CEST 2014


On 08/04/2014, 6:05 PM, Paul Murtaugh wrote:
> It appears to be a difference between versions 2.* and 3.* in the way
> that a newline ('enter') is handled at the browser prompt. Formerly, it
> would continue execution of the function; now it kicks you into
> debugging mode.  To get the old behavior, you need to enter 'c' at the
> browser prompt.

Right, I didn't realize you were using old versions on those other 
machines. Things are more consistent now (though I imagine there are 
still inconsistencies, depending on how you enter the debugging system).

Duncan Murdoch

>
> On 04/08/2014 12:34 PM, I wrote:
>> This is something peculiar about the environment on one particular linux
>> box, because it doesn't happen on other computers.  Whenever I invoke
>> browser() inside a function, it automatically enters debugging mode,
>> with line-by-line execution of code:
>>
>>    > dum <- function() { browser(); x <- rnorm(10); print(x) }
>>    > dum()
>> Called from: dum()
>> Browse[1]>
>> debug at #1: x <- rnorm(10)
>> Browse[2]>
>> debug at #1: print(x)
>> Browse[2]>
>>     [1] -0.41466890  0.02276493  1.01332894 -2.72784447  0.73471652 0.41360718
>>     [7]  1.67942142 -1.47384724  1.12129541 -1.13447881
>>    > isdebugged(dum)
>> [1] FALSE
>>
>> Thanks in advance for any tips on how to revert to the normal browser()
>> behavior.
>> -Paul
>>
>
> ______________________________________________
> R-help at 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.
>




More information about the R-help mailing list