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.

Adding args to launch.json config causes debugger to fail to launch

See original GitHub issue

User error? Either I don’t understand what “args” is in launch.json or something isn’t working as expected.

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview2-003041)

Product Information:
 Version:            1.0.0-preview2-003041
 Commit SHA-1 hash:  cc3d19463d

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.11
 OS Platform: Darwin
 RID:         osx.10.11-x64

VS Code version: 1.2.0 C# Extension version: 1.1.5

Steps to reproduce

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": ".NET Core Launch (console)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "${workspaceRoot}/worker/src/Worker/bin/Debug/netcoreapp1.0/Worker.dll",
            "args": [
                "--debug"
            ],
            "cwd": "${workspaceRoot}/worker/src/Worker/",
            "stopAtEntry": true,
            "externalConsole": false
        }
    ]
}

Expected behavior

Start the app with “–debug” passed in as an argument to Program.Main(string[] args)

Actual behavior

No executable found matching command "dotnet-/Users/namc/dev/worker/src/Worker/bin/Debug/netcoreapp1.0/Worker.dll--debug"
The program '/Users/namc/dev/worker/src/Worker/bin/Debug/netcoreapp1.0/Worker.dll' has exited with code 0 (0x00000000).

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
gregg-miskellycommented, Jun 14, 2016

I confirmed that this is fixed by 9bc4d2f8871853f04f8190aa5951f524541dd9d1. The fix will ship with 1.1.6, which we expect to post very soon. Hopefully today.

0reactions
natemcmastercommented, Jun 15, 2016

Awesome. Looks good 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging in Visual Studio Code
Press the Add Configuration button to invoke snippet IntelliSense at the start of the array. Choose Add Configuration option in the Run menu....
Read more >
Specifying arguments in launch.json for Python - Stack Overflow
Run -> Open Configurations -> Edit file 'launch.json' launch.json and add the argument workspace_path (without cuotes).
Read more >
Customize build debug tasks with JSON files - Visual Studio ...
Specify command-line arguments for debugging. Accessed via the Solution Explorer right-click menu item Debug and Launch Settings. These .
Read more >
Debugging
Open the Command Palette, select Debug: Start Debugging , then select Go . · Open the debug window (Windows/Linux: Ctrl+Shift+D; OSX: Shift+Command+D) and...
Read more >
Troubleshooting - Jest
This will run Jest in a Node process that an external debugger ... Then attach VS Code's debugger using the following launch.json config:....
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