-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Debugging not working with XCode 12 selected #42311
Comments
Tagging subscribers to this area: @tommcdon |
Looks like we may be seeing some customers running into this problem when debugging in VS Mac with Xcode 12 installed.
|
I can confirm this workaround.
Now everything works for me. |
Thanks!
The direct link to the Xcode 11.7 file didn't work for me. In case anyone else is having trouble, go to Apple's More Downloads for Apple Developers page and search |
Im wonder how could priority on this be increased so someone takes a look at this since more and more developers will start switching to XCode 12 since it was released last week, and milestone .NET 6 feels too far away... At first I though this would only be problem for unit tests but looks like its effecting also developers... Regards, |
@c-lamont and @brminnick solution worked for me as a workaround as well. Just to mention, my initial workaround was to Dockerize my .NET core app and run it in a Linux container. Just in case the above workaround does not work for others out there. |
@DavidKarlas the milestone means that it will be completed in master first. If there's enough customer feedback, we take it to ship room for backport approval. I can imagine this fitting the requirements easily. And sorry for the time it's taken me. I've had an avalanche of issues coming in and I tried getting XCode 12, but my Mac seems... a little hesitant to help here. With all of us working from home, I haven't been able to access a different device. I'll see if a teammate can help me out to repro this. |
@hoyosjs Tnx for explaining, I just thought that milestone means it will have to wait few months... If you want me to do some testing/debugging let me know. |
Re workaround: It seems that downloading and installing the "Command Line Developer Tools for Xcode 11.5" ( Once installed, switch to this version of the tools with |
Works like a charm in OSX 10.15.7, VS Studio 2019 |
Also fixes the issue on Rider for me as well. |
This is most likely fixed by #42900 |
I upgraded Xcode to the new version 12.1 and now the debugger is busted. Not to mention in the simulator the perform segue goes to the view controller but the view doesn't render. Worked before the update and works on my phone. Also, the date picker is coming up different in the simulator. |
Hi, I'm experiencing this bug since I updated my XCode to 12 (now 12.1). Would it affect my mobile app builds if I install the build tools for XCode 11? It's frustrating to not be able to debug code in Rider and Visual Studio. |
This is related to the tools that are installed on the machine that's running the app under the debugger. We used to rely on cc: @gregg-miskelly the affected API needed for this lives in the PAL and is only really used through dbgshim (apis like CreateVersionStringFromModule and EnumerateCLRs). |
Thanks @hoyosjs . It's manageable for the meantime debugging code only through But it would really be great to have this fixed and be able to debug code normally again. |
@kuromukira you can use the workarounds posted above to debug normally. Using an older copy of Xcode. Its pretty easy to switch back and forth if you also do other things with Xcode 12. |
@hoyosjs after upgrading to Big Sur I'm unable to use the workaround, so a back port of the fix would be helpful. |
I have the same issue as @8or15. Here the error if you try to install the Command Line Tools 11.5: @hoyosjs
|
I was experiencing the same issue before and the fix did it for me. But after updating to BigSur |
I had to downgrade back to macOS Catalina 10.15.7 (19H2) and the Command Line Developer Tools for Xcode 11.5 (version 2373). Currently, that is the only way I can be productive on .NET Core 3.1 |
@mikem8361 has started the discussions for the backport in #44748 |
None of the solutions work for me on Big Sur 😢 |
The fix had been merged in time to make it into our next official build. After that it needs to be picked up by the different debuggers in the ecosystem. VS for mac and VSCode use the same debugger engine and the owners expressed interest in including the fix as soon as possible. |
@hoyosjs Looks like it was backported to .NET 5. Does the issue affect .NET 2.1 and/or .NET 3.1? Are those backports being requested too? |
@sdmaclea Because this is a dbgshim fix - it doesn't need to be. Any debugger that wants this fix can use the .NET 5 dbgshim. |
Ran a test of this fix and it looks good to me with Xcode 12.2.
I am assuming there will be a more official debugger zip at some point with this updated libdbgshim.dylib that can be bundled with OmniSharp and VS Mac? |
@wingchunninja Sorry, I was testing an internal 5.0.1 build. Not sure if this change has made it into the 5.0.200 preview builds from https://github.com/dotnet/installer yet. |
@mrward Ah okay. Thank you. I will take a look if there are some changes there. It is a pretty blocking issue for me since i cannot debug in the normal way without console logging. |
Yes, soon after 5.0.1 ships the VS debugger team expects to put out a new release of vsdbg-ui which can be included into the VS Code C# extension and VS For Mac. |
@mrward Thank you for the hint. This did the work for me 🙂 |
@tommcdon set this to tracking as all the runtime side of the work is done. |
There is now a beta release of the VS Code C# extension that contains this fix: v1.23.8-beta1. |
@gregg-miskelly How about for VS for Mac? Still can't debug with VS for Mac even with 5.0.1 installed |
@kuromukira There should be a new VS Mac 8.8.4 release with the updated debugger at some point - I do not have a specific date as yet. For a workaround you can probably copy the libdbgshim.dylib from /usr/local/share/dotnet/shared/Microsoft.NETCore.App/5.0.1/libdbgshim.dylib into VS Mac's app bundle |
VS4M version 8.8.4.30 which contains a fix for this issue is available by now: https://docs.microsoft.com/en-us/visualstudio/releasenotes/vs2019-mac-relnotes#884 Issue can probably get closed. |
Looking at VSCode extension, looks like they have fix available in preview and will probably land very soon on stable, closing. |
Description
In VSMac, we are using
vsdbg
(same as Omnisharp) to debug .NET Core applications... We have unit tests, but ever since bumping XCode from 11 to 12, debugging started failing... So here are repro steps:sudo xcode-select -s /Applications/Xcode_12.app
mkdir xcodeTestProj
cd xcodeTestProj
dotnet new console
dotnet publish --runtime osx-x64
code .
launch.json
via VSCode, and change:"program": "${workspaceFolder}/bin/Debug/net5.0/xcodeTestProj.dll",
"program": "${workspaceFolder}/bin/Debug/net5.0/osx-x64/publish/xcodeTestProj.dll",
Unable to attach to CoreCLR. Unknown Error: 0x80131c3c
Now try all steps, but change step 1 to
sudo xcode-select -s /Applications/Xcode_11.app
(notice change of Xcode version), it will work fine.I tried to change to not use published version... But when tests are executing they fail either wrong variables values are reported or “Unable to evaluate expression because the code is optimized o...”.(Only when using XCode 12, fine with XCode 11). I believe underlining problem is same, hence I suggest trying debugging published app since its easier repro...
Im not sure how is selecting XCode 12 vs 11 effecting debugging of CoreCLR, but it does, I suspect its something related to
lldb
or some libraries used...Configuration
Regression?
No.
Other information
We have to disable .NET Core unit tests for until this is resolved, but I also believe this will effect users when doing some complex debugging.
The text was updated successfully, but these errors were encountered: