ManuelHentschel / vscDebugger

(Partial) Implementation of the Debug Adapter Protocol for R
https://manuelhentschel.github.io/vscDebugger/
MIT License
90 stars 14 forks source link

Debug Rmd #177

Open ManuelHentschel opened 2 years ago

ManuelHentschel commented 2 years ago

Addresses https://github.com/ManuelHentschel/VSCode-R-Debugger/issues/153.

Modifies the debug source function so that it automatically passes a file through knitr::purl if it is rmd. Relies on unmodified line numbers in the output. This seems to work for very "vanilla" rmd files but fails e.g. if the rmd file contains code blocks from other languages. This might be solved by matching parsed lines to actual lines in the source file.