Skip to content

Commit 2e56075

Browse files
charliegdevBillWagner
authored andcommitted
Update with-visual-studio-code.md (#6495)
* Update with-visual-studio-code.md Add a section with a configuration change to get debugging working for some users. This change follows this issue: #5901 (comment) * add `json` as a language marker
1 parent a3375e7 commit 2e56075

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

docs/core/tutorials/with-visual-studio-code.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,37 @@ You can also watch a short video tutorial for further setup help on [Windows](ht
8282
> [!TIP]
8383
> For more information and troubleshooting tips on .NET Core debugging with OmniSharp in Visual Studio Code, see [Instructions for setting up the .NET Core debugger](https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger.md).
8484
85+
8. If debugging doesn't work in Visual Studio Code, you might need to change some configurations. Open `.vscode/launcher.json` file; you'll see 3 configuration sections:
86+
87+
* `"name": ".NET Core Launch (console)"`
88+
* `"name": ".NET Core Launch (web)"`
89+
* `"name": ".NET Core Attach"`
90+
91+
In the first section, `"name": ".NET Core Launch (console)"`, find the `"program"` field. Change its value to
92+
93+
```json
94+
"program": "${workspaceFolder}/app/bin/Debug/netcoreapp2.1/app.dll",
95+
```
96+
97+
That section of your `.vscode/launch.json` should then look like this after the change:
98+
99+
```json
100+
{
101+
"name": ".NET Core Launch (console)",
102+
"type": "coreclr",
103+
"request": "launch",
104+
"preLaunchTask": "build",
105+
"program": "${workspaceFolder}/app/bin/Debug/netcoreapp2.1/app.dll",
106+
"args": [],
107+
"cwd": "${workspaceFolder}",
108+
"console": "internalConsole",
109+
"stopAtEntry": false,
110+
"internalConsoleOptions": "openOnSessionStart"
111+
},
112+
```
113+
114+
Debugging in Visual Studio Code should work after that change.
115+
85116
## See also
86117
[Setting up Visual Studio Code](https://code.visualstudio.com/docs/setup/setup-overview)
87118
[Debugging in Visual Studio Code](https://code.visualstudio.com/Docs/editor/debugging)

0 commit comments

Comments
 (0)