Debugging a container inside a local Kubernetes Cluster with VS Code on Linux
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 737
- Avg merge
- 18h 40m
- Merged PRs (30d)
- 31
Description
Hi, I'm using minikube to host a microsoft/dotnet:2.0-runtime container on a local Kubernetes cluster. The host machine is Ubuntu 14.04.
I'm trying to use VSCode to debug the container in the cluster. I was able to debug the container if I run it outside of the cluster (using docker) based on these 2 articles: [this](http://blog.jonathanchannon.com/2017/06/07/debugging-netcore-docker/) and [this](https://github.com/sleemer/docker.dotnet.debug).
However, I couldn't find a way to debug the container when it is run inside a cluster. I tried a configuration like:
```
{
"name": ".NET Core Remote Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickRemoteProcess}",
"pipeTransport": {
"pipeProgram": "/usr/local/bin/kubectl",
"pipeArgs": [ "exec", "" ],
"debuggerPath": "/vsdbg/vsdbg",
"pipeCwd": "${workspaceRoot}",
"quoteArgs": false
},
"sourceFileMap": {
"/app": "${workspaceRoot}"
},
"justMyCode": true
}
```
but that doesn't work. I've tried to tweak it a few times but to no avail (I have got some errors like `Error from pipe program 'kubectl': Error: Input connection was closed. Aborting the debug session.`).
Has anyone been able to debug a container inside a local Kubernetes Cluster using VSCode?
Contributor guide
Assessment
This issue has not been assessed yet.