-
Notifications
You must be signed in to change notification settings - Fork 677
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
Support debugging ARM64 processes on Apple M1 #4390
Comments
We have started work to support this, but we are still a bit off from supporting this scenario. |
@gregg-miskelly are the debugger changes accessible to the public for community contributions? |
@archanox We are still working on getting the debugger compiling, so nothing to share yet. Here are the potential work arounds depending on your situation:
|
@gregg-miskelly Visual Studio for Mac (version 8.9 ) can debug .NETCore in Rosseta 2 ...... so OmniSharp can publish rossata2 version firstly. |
@lokinfey If you are talking about debugging a .NET Core app running under emulation -- that should work today. |
@gregg-miskelly is there a timeline for this use case to be supported i.e would be safe to assume that this should come on stream with the full release of NET 6 in November and that supporting apple silicon ? |
@TomMurphyDev yes, it is extremely likely that the C# extension will release osx-arm64 debugging support prior to the official .NET 6 release. |
Hi all, I just tried this today, trying to debug a PowerShell osx-arm64 build using the beta O# release, but in the beginning was still getting the same error. I switched back to osx-x64 and was prompted for the permission (unlike with osx-arm64). Filling out that prompt and rebuilding again for arm64, I was then able to attach. So I think there's still a smaller issue around not being prompted for permission when trying to attach for the first time to an ARM64 process perhaps. |
@gregg-miskelly, reading your comments I'm assuming that debugging arm64 should work, but it does not (for me, at least :)). I can't see any logs that I could share with a specific error message (the debugger simply starts and exists, no errors) on a .net 6.0.0 project. OmniSharp log does not emit anything. Even if I turn on The behavior is the same whether I launch or try to attach to a running process. What can I do to troubleshoot / where can I get some trace logs of what is going on? PS: the project is the most simplistic console app, created by Console.ReadLine();
Console.WriteLine("Hello world!"); |
@skyflyer If you are having trouble, please open a new issue and include a debugger log (see instructions). |
@gregg-miskelly I'm getting the same error. M1 Max vscode, .net6, latest mono preview 6.12.0.158, azure functions v4. Here is the output:
|
Not sure if @ChristianWeyer 's supposed solution in dotnet/runtime#54322 works for anyone. I couldn't figure out how to delete just x64, I tried deleting the x64 folder, and the dotnet uninstall cli tool's list command reported only arm64 dotnet 6 runtime, but it still didn't work for me (not sure if that's coz i deleted x64 incorrectly, or if that just doesn't fix the issue). |
@EthanSK If arm64 debugging isn't working for you, make sure you are using the arm64 version of VS Code. If you are, please open a new issue. |
I might have to open a new issue because i'm using arm64. But before I do, I'm wondering, I don't see any arm64 version of omnisharp? Does it even exist? Doesn't that require arm64 mono, of which there is none |
OmniSharp (the language service) runs under emulation. The debugger (vsdbg-ui) needs to match the bitness of the target process. So if you are debugging a native arm64 process, a native arm64 version of vsdbg-ui is used. |
@EthanSK, for what is worth, I had the same problem (see #4887), and then I installed arm64 version of VSCode and removed the You can verify that you have them by checking |
@ skyflyer Thanks for the tip, I followed that exactly and it didn't work. The output of ls - l is
Guess i'll stick to debugging with console log for now :( |
@EthanSK, this looks right to me. I'm guessing that @gregg-miskelly, I hope you don't mind the comments in an old issue... |
@skyflyer Thanks for the suggestion. @gregg-miskelly I made a new issue here where I posted the output from @skyflyer 's most recent suggestion. |
Environment data
Mac OS: osx.11.2-arm64 with chip: Apple M1
VS Code version:1.53.0
C# Extension version:1.23.9
.NET 6 arm64: 6.0.100-preview.1.21108.2
Steps to reproduce
Expected behavior
The project could debug succeed.
Actual behavior
Debugging project failed as unable to attach to CoreCLR. Unknown Error: 0x80131c3c.
dotnet --info
output:.NET SDK (reflecting any global.json):
Version: 6.0.100-preview.1.21108.2
Commit: 2e79ad7aed
Runtime Environment:
OS Name: Mac OS X
OS Version: 11.2
OS Platform: Darwin
RID: osx.11.0-arm64
Base Path: /usr/local/share/dotnet/sdk/6.0.100-preview.1.21108.2/
Host (useful for support):
Version: 6.0.0-preview.1.21102.12
Commit: 9b2776d481
.NET SDKs installed:
6.0.100-preview.1.21108.2 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.0-preview.1.21103.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.0-preview.1.21102.12 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
The text was updated successfully, but these errors were encountered: