-
Notifications
You must be signed in to change notification settings - Fork 11
Description
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 make VSCode stop at breakpoints upon attaching to the R process as documented in https://github.com/ManuelHentschel/vscDebugger/blob/master/vignettes/vscode-R-Debugger.Rmd#L65.
To Reproduce
Steps to reproduce the behavior:
- Execute the following R code:
library(vscDebugger)
print('Started listening for debugging connections...')
.vsc.listen()
print('Got a debugging connection...')
Sys.sleep(5)
.vsc.debugSource('file.R')
print('Finished executingR')
- When the R script execution reaches
.vsc.debugSource('file.R')start the R debugger with the following configuration:
{
"type": "R-Debugger",
"name": "Attach to R process",
"request": "attach",
"useCustomSocket": true
},
- In VSCode, set manually some debugging points in
file.R - Hit the 'Continue' button so the debugger proceeds stepping through the code
- The debugger doesn't stop at any breakpoints defined in step 3.
Your R code
library(vscDebugger)
print('Started listening for debugging connections...')
.vsc.listen()
print('Got a debugging connection...')
Sys.sleep(5)
.vsc.debugSource('file.R')
print('Finished executingR')
Your Launch config
{
"type": "R-Debugger",
"name": "Attach to R process",
"request": "attach",
"useCustomSocket": true
},Expected behavior
The debugger should stop at any breakpoint defined in file.R in VSCode.
Actual behavior
The debugger just executes the file without stopping at any breakpoints.
Desktop (please complete the following information):
- OS:
Ubuntu 22 - R Version:
4.1.2 - vscDebugger Version:
0.5.5 - vscode-r-debugger Version:
0.5.3
Additional context
Not sure if I need to use Sys.sleep(5)? Perhaps that line could be removed. Also do I need to use "useCustomSocket": true?