RStudio debugging issue

I'm running RStudio 2024.04.2 Build 764 and 64 bit Base R 4.4.1 on Windows 10. I have some code to iterate through a loop and I wish to set breakpoints to debug.

  n<-nrow(ResultsData)
  for (i in 1:n)
  {
    CurDataset <- read_excel(InFileExcel, sheet = as.character(ResultsData$File[i]))
   #Remainder of the code
 }

If I set the breakpoint outside the loop everything is OK and I get the usual green debugging arrow, which I can then use to follow through my code when I press F10. However, if I set the breakpoint in the loop, the breakpoint still works, but I no longer get the green arrow. I get
debug: Line of code
for each line of code. This is only a minor inconvenience, but I've never experienced it before. Is this a known minor glitch or is there some debug setting that I may be missing?

Update: I also tried this with a minimalist function

SillyFunc<-function(){
  print("SillyFunc")
  for (i in 1:10)
  {
    print(i)
  }
}

Again, if I set the breakpoint at print("SillyFunc") I get the green arrow, but if I set it at print(i) then I do not.

1 Like

i have a similar issue on Mac - RStudio 2024.04.2 Build 764, R 4.4.1.

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.