Breakpoints in "Debug R-Package" are not loaded/hit
See original GitHub issueDescribe the bug When debugging an R package by entering the path to the package folder structure, the breakpoints set within the files which are part of the package aren’t entered, i.e the program doesn’t always stop. The behaviour seems to be a bit random.
To Reproduce Steps to reproduce the behavior:
- Open a folder containing the R package to debug in the folder structure.
- Open the “launch.json” file and enter the path to the package in the entry “loadPackages” in the “Debug R-Package” entry in the json.
- Click “Run” button in the debugger with the “Debug R-Package” option selected.
- Use the debug console to call a function exported in the package.
- If the program stops at a breakpoint set before, set a new breakpoint and press “F5”.
- Not see your breakpoint get hit.
Your Launch config If applicable, the launch config that causes the bug. E.g.:
{
"type": "R-Debugger",
"name": "Debug R-Package",
"request": "launch",
"debugMode": "workspace",
"workingDirectory": "${workspaceFolder}",
"includePackageScopes": true,
"loadPackages": [
"./apLCMS"
]
}
Expected behavior Upon debugging the package, all breakpoints set are hit properly and stop program execution.
Actual behavior Some breakpoints are hit, some aren’t, some in other files than the one opened on startup are never hit.
Desktop (please complete the following information):
- OS: Windows
- R Version: 4.0.3
- vscDebugger Version: 0.4.5
- vscode-r-debugger Version: v0.4.5
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How do I remedy "The breakpoint will not currently be hit. No ...
When debugging, goto to the Debug, Windows, Modules view. This will show info about loaded modules and symbol status. You can right click...
Read more >Debugger problem "The breakpoint will not currently be hit. No ...
Click on the Menu item for Build then select Configuration Manager. Here you can set the configuration for each project in your solution....
Read more >Debugging react app with hot-reloading does not work #215
js file, and the changed code gets hot-reloaded in the dev server, no breakpoint is hit anymore. Sometimes breakpoints are still hit and...
Read more >Debugging the Eclipse IDE for Java Developers
Breakpoint Working Sets defines a group of breakpoints. User can perform actions like enable/disable on a working set. Breakpoints are sorted by Name...
Read more >Debug external code | JetBrains Rider Documentation
However, breakpoints in external code will be ignored by the debugger and you will not be able to step into external code. So...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I added a Vignette about breakpoints to the package (can be found e.g. here). If you encounter problems that do not match the behavior described there or would like to add your debugging routine, feel free to reopen this issue.
@kongdd I had the same error at some point and it was related to the version of the pkgload package (I think that was the name). So try seeing which version you are using.
- r-pkgload <= 1.2.4