Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rstudio does not stop at breakpoint

A few weeks ago I worked with breakpoints in Rstudio. It worked as I expected: stopping at breakpoints.

However, now I need to use it again, I can't get it to work; more specifically: when I set a breakpoint in Rstudio a red dot is appearing next to the code line (see screenshot), but when running the code, it does not stop at the break point.

I created a simple code example for this post to show what I want: run a for loop line for line.screenshot Rstudio

Perhaps I am just not understanding something :) So, could anyone help me with getting these usefull debugging tools in Rstudio to work?

Thanks in advance.

like image 288
Marc Avatar asked Nov 27 '18 14:11

Marc


People also ask

Why is my breakpoint not working?

If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.

How do I stop a debug function in R?

c to leave the debug mode and continue with the regular execution of the function. Q to stop debug mode, terminate the function, and return to the R prompt.

How do you continue the program after stopping at a breakpoint?

You can use breakpoint commands to start your program up again. Simply use the continue command, or step , or any other command that resumes execution. Any other commands in the command list, after a command that resumes execution, are ignored.

How do I set a breakpoint in RStudio?

The most common (and easiest) way to stop on a line of code is to set a breakpoint on that line. You can do this in RStudio by clicking to the left of the line number in the editor, or by pressing Shift+F9 with your cursor on the desired line. We call this an “editor breakpoint”.


1 Answers

Breakpoints also do not work for me on shiny app developed in RStudio, I am using browser() instead of breakpoints, and it works.

see this

M

like image 159
Michael Kassa Avatar answered Sep 19 '22 15:09

Michael Kassa