-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to start debugging Docker container #162
Comments
Hi shaggygi, Couple things to check with you. Do you have your systemdrive shared with Docker For Windows? Do you find a %userprofile%\clrdbg folder? My guess is that this local folder not getting volume mapped into the container for some reason. |
@dbreshears I can navigate and see the mentioned folder and is empty. |
@shaggygi . We download a script named "GetClrDbg.ps1" to the %TMP% folder and attempt to execute that. This script will result in creating the %userprofile%\clrbdg. Do you see that script in the temp folder? Do you happen to have any spaces in the path for %TMP%? |
@dbreshears I can see "GetClrDbg.ps1" file in the temp directory and there are no spaces in the path. For example... C:\Users\MyUserName\AppData\Local\Temp |
@shaggygi, please try deleting the "GetClrDbg.ps1" from the %temp% folder and try F5 again. If it still doesn't work, please let us know. Meanwhile, you also could run the following PS command from PowerShell command prompt as a workaround: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
.\GetClrDbg.ps1 -Version latest -RuntimeID debian.8-x64 -InstallPath "$env:UserProfile\clrdbg" It will pull the latest version of clrdbg to %UserProfile%\clrdbg and you should be able to get through the issue. |
@dbreshears @weidazhao I deleted "GetClrDbg.ps1" and tried rebuilding and deploying, but get same error on not able to debug. I tried the second instruction of running the provided PowerShell command and worked. I was able to deploy to the container, the ASP.NET Core app opened in browser and was able to set a breakpoint to step through code. I did notice red squiggles and such throughout code, but should not be related to this issue. I'm seeing other issues on other repro projects related to VS 2017 RC bugs. Thanks for being patient and helping with my problem. I can close this issue unless it might be needed to help track for future fix. Let me know. |
@shaggygi, can you please reproduce the issue and find the logs in the Build output window to send to me? You can delete %UserProfile%\clrdbg and F5 to repro the issue. VS will try to download the debugger again. Thanks. |
@weidazhao I deleted the clrdbg directory and GetClrDbg.ps1 and rebuilt the app. It appeared to create them again and my demo app ran/debugged fine. I don't think I will be able to reproduce the original error: "Unable to start debugging. Unable to establish a connection to CLRDBG. Debug output may contain more information." |
Glad to see a solution was found. @weidazhao, if necessary please track any needed fixes on your side. This issue is not related to the dotnet/dotnet-docker repo therefore I am closing it. |
I tried the above steps and get the below success message But when I looked at the clrdbg folder I could see only two files success_rid.txt On my friend's machine there are 100+ files. Any suggestion ? |
I am getting this error when I've already been building a .Net Core Web Application connected to VTFS and published on Azure, this morning I did my normal thing and started coding but when I ran locally I got this error. Below is the only thing in my output window. I'm going to try the powershell command above.
|
When I try to run |
Just to report. Everything above checked out and all I did was click "restart Docker" even though I had already closed it and opened it. Then debugging started working again so I have no idea what the problem was. |
A similar error occurred to me today. Clicking "restart Docker" as per DanJS10's instructions seemed to fix the problem. |
I had the similar issue, when i restarted docker as DanJS10 mention worked, the problem was docker checkign clrdbg\vsdbg\vsdbg which don't exists, all files are under clrdbg\vsdbg |
I'm trying out the new Visual Studio 2017 RC and ASP.NET Core web app and get a prompt stating "Unable to start debugging. Unable to establish a connection to CLRDBG. Debug output may contain more information."
Output Windows shows the following:
Starting: "docker" exec -i 7459ff7a006c /clrdbg/clrdbg --interpreter=mi
rpc error: code = 13 desc = invalid header field value "oci runtime error: exec failed: container_linux.go:247: starting container process caused "exec: \"/clrdbg/clrdbg\": stat /clrdbg/clrdbg: no such file or directory"\n"
"docker" exited with code 126 (0x7E).
Steps to reproduce the issue
Expected behavior
Should run app in container and allow breakpoints, etc.
Actual behavior
It prompts with error mentioned above. It does appear to deploy and run a container.
Output of
docker version
Output of
docker info
The text was updated successfully, but these errors were encountered: