-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
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.appmkdir xcodeTestProjcd xcodeTestProjdotnet new consoledotnet publish --runtime osx-x64code .- create
launch.jsonvia VSCode, and change:
"program": "${workspaceFolder}/bin/Debug/net5.0/xcodeTestProj.dll",- to
"program": "${workspaceFolder}/bin/Debug/net5.0/osx-x64/publish/xcodeTestProj.dll",
- Start debugging
- Observe Debug Console print
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
- Which version of .NET is the code running on? 3.1, but also tried with 5.0
- What OS and version, and what distro if applicable? macOs
- What is the architecture (x64, x86, ARM, ARM64)? x64
- Do you know whether it is specific to that configuration? Yes(macOs)
- If you're using Blazor, which web browser(s) do you see this issue in? N/A
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.