VSCode-R-Debugger
VSCode-R-Debugger copied to clipboard
incompatible with targets
NOTE: Before submitting an issue, please make sure to install the latest version of both the vscode extension and the R package. This can usually be achieved by running the command r.debugger.updateRPackage
in vscode's command palette (F1
).
Describe the bug Can't debug code that uses the targets r package
To Reproduce
- get an example project from the targets official website.
- write an entrance script containing tar_make(target_name, callr_function = NULL)
- no targets are run, different behaviour than run in a console.
Your R code
Your Launch config If applicable, the launch config that causes the bug. E.g.:
{
"name": "R: tar_make",
"debugMode": "file",
"type": "R-Debugger",
"request": "launch",
"file": "tar_make.R",
"workingDirectory": "${workspaceFolder}",
"allowGlobalDebugging": false,
"debuggedPackages": ["targets",],
"commandLineArgs": [
"--vanilla"
],
}
Expected behavior
- the target
target_name
should be run as it does when invoked by Rscript; - Breakpoints and browser() calls should enter me into the debug console.
Actual behavior no targets are run as if no targets have been specified.
Desktop (please complete the following information):
- OS: windows 10
- R Version: 4.1
- vscDebugger Version: 0.4.7
- vscode-r-debugger Version: 0.4.7
Additional context Add any other context about the problem here.
If I remove the callr_function = NULL
(the targets official way of debugging code), the targets are run normally but no debugging functionality works.