Debugger does not stop after "if else" syntax

Hi developers,

Debugger (ver. 1.1.463) can stop at a line within a "if else" syntax. However, the debugger fails to stop at any line after this "if else" syntax.

Any chance you could ask this with a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.

Thanks for the reminder. I now have provided a reproducible example. Please see my code below.

Save1.R and source 2.R. Then set a breakpoint at nethermost x (around Line 30) in 2.R. Run "test(2)" in 1.R. You'll see debugger does not stop at the breakpoint. But funny that it can stop before the "if else".

For 1.R, the code is

source("2.R")
test(2)

For 2.R, the code is

test <- function(x){

if (is.null(x) & is.null(x)){
stop("Stop")
}

######################## Empirical Histogram ############################

if (x > 1){
#########################################################
#########################################################
#########################################################
print("Hi")
}else if (x<0){
#########################################################
#########################################################
#########################################################
print("yes")
}else{
#########################################################

#########################################################

#########################################################
print("no")

}

x

}

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.