10

I've had a difficult time finding instructions on how to set up debugging within Visual Studio Code on Windows (10 if it matters) using the launch.json file.

Can someone define how to set this up?

Kevin Kraus
  • 283
  • 1
  • 2
  • 11

1 Answers1

1

To debug using visual studio code you have to ensure that the configuration that you select in the debug tab is properly set up in the launch.json. The configurations in launch.json should look like this

"configurations": [
    {
        "name": ".NET Core Launch (console)",
        "type": "coreclr",
        "request": "launch",
        "preLaunchTask": "build",
        "program": "${workspaceRoot}/bin/Debug/netcoreapp1.0/Example.dll",
        "args": [],
        "cwd": "${workspaceRoot}/",
        "stopAtEntry": false
    }]

From my experience the most common problem is an incorrect path the program dll. I would double check that this path actually points to your compiled debug dll. If not, either modify this path or modify the target location of the debug url (this first is easier). Please comment if you have any questions I just worked through this myself.

Hamburglar
  • 550
  • 3
  • 17