How to set a breakpoint in function body in R-stud

2019-04-25 08:09发布

问题:

I have an R script which calls a function written by me. However, when I execute the script, the program doesn't stop at the debug point in the function body. The only time debug points work is when they are set in the main script file. I am using R-studio IDE, however any general solution would also be appreciated.

回答1:

If you work on multiple files, you have to source R files with

debugSource("C:/Users/...")

instead of

source("C:/Users/...")

from your main script



标签: r rstudio