I have a peculiar problem: the debugger stops at a line that is far off from the place I mark the debugger to stop. I have sourced the .r file multiple times, changed the location of the debugging point (the red dot) many times but as soon as I source the file it stops at one line which is far off from the line I marked...it is this one (the code may not make sense as itis out of context) but I can't possibly paste all the lines of code.
Could you paste a few lines of code around it, just enough so someone else can replicate? Thanks.
Also, what versions of R and RStudio are you using? (again, for replication purposes)
I am trying to replicate the problem by changing the location of debugging point. I encounter this new error when I change the debug point to a few lines up or down. But this goes away after I remove the debug point and again add it.
Error in fBody[[i]] : subscript out of bounds
Mara - I can copy a few lines of code but you won't be able to run it as obviously the first error you may get will be: object 'varname' not found
The error message you cite has a pretty straightforward meaning though. In the list fBody there simply isn't an ith value. If fBody is a data.frame, then there isn't an ith column.
Even after RStudio upgrade, the problem resurfaced.
Although in the current manifestation it is slightly clear what is happening...and I guess someone may be able to suggest an immediate solution.
There is a red circle at the point - not a solid red dot, which it should become after sourcing the code. That looks to be the root cause of the invisible debug point.
I attach another screencast capture - now on the new version of RStudio.
I noticed the same issue. Although more precisely, if I set a breakpoint on a line that is not an if condition, all is fine. But when I do set the breakpoint on an if line, the screen seems to show more or less the middle of the section encapsulated between the brackets following the if condition.