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.

Initial debug configurations

See original GitHub issue

Describe the bug I had trouble setting up the extension, because

  1. I expected the extension to come with a basic debug configuration, but
  2. I did not see it - I had to add one to launch.json myself.

I found this, so you are probably aware of automatic debug configurations: https://github.com/ManuelHentschel/VSCode-R-Debugger/blob/4fd0e703860a53cffbbc9fe2d086bd949098a078/src/extension.ts#L25 (Update: I guess I was wrong here: you’re not using DebugConfigurationProviderTriggerKind.Dynamic nor onDebugDynamicConfigurations anywhere.)

But as I said, I don’t see them. This is after I click “Show all automatic debug configurations”: image

What works is pressing F5 - then, I get this: image

but then this: image

and this: image

So then I opened C:\Temp. Debug configurations are still empty.

Then, upon F5, I get this: image (Which is weird because C:\Program Files\R\R-4.0.2\bin\R.exe is exactly the path my R binary.)

Still, clicking “Open launch.json”, it opens a launch.json with three entries pre-filled (Launch Workspace, Debug R-File, Debug R-Function). And now I also see them in the launch panel, and debugging works without changing any path.

In summary:

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:21 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
ManuelHentschelcommented, Oct 21, 2020

I had expected automatic debug configurations to be listed immediately, but this does not seem to be the case when you don’t have any other configuration, even after opening a .R file. This experience is still suboptimal, but that’s how it works in VS Code apparently.

This is probably intentional, since listing all automatic debug configurations would require activating all installed debugger extensions, which might take some time

1reaction
ManuelHentschelcommented, Oct 21, 2020

I forgot to say that I don’t seem to be setting this variable anywhere. R.exe is in my %PATH%, so it’s probably found there. We might branch this off into a separate issue 😉

I just added automatic quotes if the path contains spaces and an option to add custom command line arguments for the call to R. Thah should hopefully work for everyone.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create and edit run/debug configurations - Android Developers
To open the Run/Debug Configurations dialog, select Run > Edit Configurations. The Run/Debug Configurations dialog appears, as shown in figure 1. Figure 1....
Read more >
Set debug and release configurations - Visual Studio (Windows)
In the Configuration list at the top, choose Debug or Release. Select the Advanced button (or the Advanced Compile Options button in Visual ......
Read more >
Debugging in Visual Studio Code
In order to start a debug session, first select the configuration named Launch Program using the Configuration dropdown in the Run and Debug...
Read more >
Run/debug configurations dialog | IntelliJ IDEA Documentation
Use this dialog to create, edit, adjust, or remove run/debug configurations, as well as to configure the default templates that will apply ...
Read more >
Starting a debug session with an existing launch configuration
You can debug with an existing launch configuration by way of the launch history, your favorite debug configurations, or the Debug launch configurations...
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