question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Breakpoints in "Debug R-Package" are not loaded/hit

See original GitHub issue

Describe 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:

  1. Open a folder containing the R package to debug in the folder structure.
  2. 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.
  3. Click “Run” button in the debugger with the “Debug R-Package” option selected.
  4. Use the debug console to call a function exported in the package.
  5. If the program stops at a breakpoint set before, set a new breakpoint and press “F5”.
  6. 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:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ManuelHentschelcommented, Mar 13, 2021

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.

0reactions
hechthcommented, Oct 26, 2022

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found