Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set a breakpoint in function body in R-studio?

Tags:

r

rstudio

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.

like image 892
stressed_geek Avatar asked Apr 08 '15 10:04

stressed_geek


1 Answers

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

like image 126
rmuc8 Avatar answered Oct 22 '22 07:10

rmuc8