0

I googled and looked on stackoverflow but couldn't find a solution.

Setup:

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

2
  • Probably it is running some wrong command, with total combination. See if you could figure what command was actually run? Commented Oct 12, 2017 at 15:06
  • Thanks for reply. Only thing I can check from Visual Studio Code is what it prints in "Debug Console" at bottom. Is there a way to check what is it running? Some log or something? Commented Oct 13, 2017 at 2:25

1 Answer 1

1

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 
}
Sign up to request clarification or add additional context in comments.

8 Comments

Thanks, I tried it but I get following error now: Starting: "docker" exec -i devexamapp_debug_1 /clrdbg/clrdbg --interpreter=mi /vsdbg/vsdbg --interpreter=vscode Error from pipe program 'docker': ERROR: Unknown argument '/vsdbg/vsdbg'. I tried to remove "debuggerPath" but that didn't work either. It says "debuggerPath" is required.
Please join this chat room chat.stackoverflow.com/rooms/156714/…
It won't allow me to post any message in chat room, stackoverflow requires 20 reputation points or something.
Try changing "debuggerPath": "/vsdbg/vsdbg" to "debuggerPath": "/clrdbg/clrdbg" and see if it helps? also try using you original approach with "quoteArgs": false added and see if that helps?
First tried "pipeArgs": ["exec -i devexamapp_debug_1 /clrdbg/clrdbg --interpreter=mi"],"debuggerPath": "/clrdbg/clrdbg" - error was "This version of the C# extension no longer supports connecting to clrdbg and install vsdbg". Tried original with "quoteArgs":false and error was: error from pipe program, docker command has wrong usage
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.