Skip to content

Instantly share code, notes, and snippets.

@pavel-agarkov
Last active September 29, 2018 21:10
Show Gist options
  • Save pavel-agarkov/6d2537ada6cb07abe797fdb216346c38 to your computer and use it in GitHub Desktop.
Save pavel-agarkov/6d2537ada6cb07abe797fdb216346c38 to your computer and use it in GitHub Desktop.
VS code launch.json with configuration to attach to dotnet process running in Kubernetes
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Kubernetes",
"type": "coreclr",
"request": "attach", // we are going to attach to the existing pod
"processName": "dotnet",
"sourceFileMap": {
// mapping of source code inside a container to the source code on a host machine
"/build": "${workspaceRoot}/app"
},
"pipeTransport": {
"pipeProgram": "C:\\Program Files\\Git\\bin\\bash.exe",
"pipeCwd": "${workspaceRoot}",
"pipeArgs": [
"./kube-debug.sh",
"--selector app=my-app",
"--namespace default"
],
"quoteArgs": false,
// path to installed debugger inside a container relative to WORKDIR
"debuggerPath": "../vsdbg/vsdbg"
}
}
]
}
@pavel-agarkov
Copy link
Author

This gist is used in my article Debugging ASP.NET Core in Kubernetes from VSCode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment