Debugging with Rmarkdown

Viewed 346

I am having an issue with Rstudio's debugger whilst using Rmarkdown. The function in question is sourced in the .Rmd file from a separate functions.R file. This allows debugging via breakpoints to work if I actively source the functions.R file and comment out source functions.R line in the Rmarkdown file.

This workaround is not entirely successful though, because once I am in the Browse> console mode, I cannot inspect any of the Browse environment variables unless I view them in the Rmarkdown chunk inline output. This makes debugging clunky and difficult.

I have tried switching the Rmarkdown document settings to show output in the console, but this breaks the debugging feature completely. Ideally there would just be some setting to have output both inline and via console, but this does not seem to exist at the moment.

Is there an easier way to debug via Rmarkdown that I am missing?

0 Answers
Related