Skip to content

Instantly share code, notes, and snippets.

@petevb
Last active May 17, 2021 20:56
Show Gist options
  • Save petevb/bba85247295aef97fd5ea359e98c9998 to your computer and use it in GitHub Desktop.
Save petevb/bba85247295aef97fd5ea359e98c9998 to your computer and use it in GitHub Desktop.
Attach debugger in VS Code for WSL
{
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "publish",
"program": "${workspaceFolder}/bin/Debug/net5.0/sample1.dll",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": true,
"console": "internalConsole",
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "bash.exe",
"pipeArgs": [
"-c"
],
"debuggerPath": "~/vsdbg/vsdbg"
}
},
{
"name": ".NET Core WSL Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickRemoteProcess}",
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "bash.exe",
"pipeArgs": [
"-c"
],
"debuggerPath": "~/vsdbg/vsdbg",
"quoteArgs": true
}
}
]
}
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "shell",
"args": [
"build",
// Ask dotnet build to generate full paths for file names.
"/property:GenerateFullPaths=true",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary"
],
"group": "build",
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment