When trying to debug a MVC Web project in VS 2017 Mac I get the error message: Unable to attach to CoreCLR. dotnet
dotnet --info
|
Got the same issue (also on Sierrs 10.12.4 beta) |
This will be fixed in the next 1.0 and 1.1 service releases and has been fixed in the master branch. |
When will it be available ? Thanks |
Sierra 10.12.4 is now being pushed as an update by Apple. I installed the update this morning and now I can no longer debug in VS Code ('Unable to attach to CoreCLR.'). I believe this is the same issue reported above. I installed the latest .NET Core SDK ( dotnet --version now says 1.0.1 ). Is the fix available elsewhere, or any advice please? |
Here is a work around that worked for Gregg Miskelly:
|
Confirmed workaround works. Thanks for the info. When the real fix is released, will I need to 'reverse' the workaround, or will installing the new software get me back to consistency? |
Is there a workaround for Visual Studio Mac ? |
@gregg-miskelly Is there a workaround for VS for Mac? |
I don't have precise steps, but you can work around this by downloading https://vsdebugger.azureedge.net/coreclr-debug-1-9-0/coreclr-debug-osx.10.11-x64.zip, and replacing the version of vsdbg that VS for Mac is using with that version. @DavidKarlas do you have better instructions? |
This fixed it for me, in Visual Studio for Mac:
|
@suqram You just saved my day and night! Thx. |
@suqram it worked well! Thanks |
fix it for me! |
@suqram Excellent! Work for me! Thanks |
Excellent, copying the libdbgshim file as instructed by @suqram did the trick. |
@suqram Excellent! Work for me! Thanks |
Works for me too! thanks! |
@mikem8361 what does this mean? |
A nuget file is a zip file. Rename to .zip and run unzip on it. |
@suqram Work for me as well - thank you. |
@suqram Thanks so much! It works! |
Is this issue fixed in production now, or is it still in workaround? I noticed a new C# Extension and installed it yesterday. Does that contain the fix? |
@robbpriestley Sure seems like it. This is in the changelog for the extension in vs code: What's New in 1.8.1 Fixes debugging on macOS Sierra 10.12.4. (and it's working) Brilliant! |
I did precisely what @suqram suggested, but now I get a popup when I try to run my application:
I don't get the 'Unable to attach to CoreCLR' message in my Application Output window anymore, so that's fixed. (and to clarify: when I run 'dotnet' or 'dotnet --info' , my results are identical to those from @AAimson) |
@joristt if you have the 1.8.1 extension installed and you are still running into an issue, your issue isn't related to this issue. Please open a new issue, this issue is long enough :). |
I was working on aspnet core when this issue started, and with VS preview it used to start a new Browser with a new debug session. Am i looking for the wrong setting now? |
@gregg-miskelly Yeah you're right, sorry :). You said
and I interpreted that as: replace only the vsdbg Unix executable. Tried copying everything from that zip to the VS Adapter directory 1 minute after commenting here and that fixed the problem. |
@robvdveer by 'VS Preview' you mean 'VS For Mac Preview' correct? If so - VS For Mac hasn't shipped an update vsdbg package containing the fix yet (at least to my knowledge), so you are very likely at the right place. There are two work arounds posted above, but I will give you the latest version of it --
|
Thanks @gregg-miskelly for such a quick response! |
@gregg-miskelly well played. Thanks |
@gregg-miskelly saved the day!!!! |
@gregg-miskelly this will work on the visual studio preview the debug gives an execution error Always re-install XQuartz when upgrading your macOS to a new major version. Note: the use of X11 (including tcltk) requires to be installed since it is no longer part of OS X. The latter two components are optional and can be ommitted when choosing 'custom install', they are only needed if you want to use the tcltk R package or build package documentation from sources. Install r studio for linux. |