Reputation: 3
I googled and looked on stackoverflow but couldn't find a solution.
Host OS: Ubuntu
ASPNet Core 2
Dotnet 2.0
I have two containers, one container for MySQL and other for dotnet core. I was able to run it without installing CLR Debugger. After installing CLR debugger in one container, I am trying to use Visual Studio Code to debug aspnet core 2 app running in that container. I am getting following error:
"The pipe program 'bash' exited unexpectedly."
Only option is to "open Launch.json" and only bash command in launch.json is:
"pipeTransport": {
"pipeProgram": "/bin/bash",
"pipeCwd": "${workspaceRoot}",
"pipeArgs": ["-c",
"docker exec -i devexamapp_debug_1 /clrdbg/clrdbg --interpreter=mi"],
"debuggerPath": "/vsdbg/vsdbg"
Debug console shows following:
Starting: "/bin/bash" -c "docker exec -i devexamapp_debug_1 /clrdbg/clrdbg --interpreter=mi" "/vsdbg/vsdbg --interpreter=vscode"
If I run "/bin/bash" -c "docker exec -i devexamapp_debug_1 /clrdbg/clrdbg --interpreter=mi" "/vsdbg/vsdbg --interpreter=vscode" in a console window then it works 100% fine withotu any error.
What am I missing? Any help?
Thanks
Upvotes: 0
Views: 885
Reputation: 146510
Edit-1: 14-Oct
You need to have the debugger installed in your Docker image. You can do the same by adding below to your dockerfile
WORKDIR /vsdbg
RUN curl -SL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l /vsdbg
Then you need to updated the pipeTransport
in launch.json
as below
"pipeTransport": {
"pipeProgram": "docker",
"pipeCwd": "${workspaceRoot}",
"pipeArgs": ["exec -i devexamapp_debug_1"],
"debuggerPath": "/vsdbg/vsdbg",
"quoteArgs": false
}
Upvotes: 1