-
Notifications
You must be signed in to change notification settings - Fork 433
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 on Apple Silicon M1 with Visual Studio for Mac or JetBrains Rider Hangs #2303
Comments
Are you able to create and debug an ASP.NET Core app with VS for Mac? Just want to understand if the problem is specifically with debugging function apps. |
Yes asp.net core web app debugs fine in both vs and rider. This is just an issue in debugging azure functions. |
@ilushka85 I don’t think anyone on our team has been lucky enough to get their hands on one of these new devices. Do you have more details on the error that you can share? For instance, I believe in your original issue you mentioned an error about the debugger being used outside of visual studio products. Is that still the problem? Have you tried it with VS Code? Thanks. |
This is only a problem for Azure Functions. Debugging regular .net core web apps works fine. Running Azure Functions without debugger works fine. Debugging is an issue in both Rider and Visual Studio for Mac. Is there something I can do to produce more details? Happy to help any way I can |
Can you provide more of the console output? Also if you can confirm whether you get the same problem in VS Code, it would be helpful. Thanks. |
Thats actual the entire console output it does not go any further and believes its running. CPU usage shows 100% for the Func app. Will try on vs code |
Same result in all systems. |
I just bought a MacBook Pro M1 today and immediately faced the same issue when debugging a Razer Pages Web Application. I use Safari to debug and it worked no problem on my Intel 2020 MacBook Air. After reinstalling many times and ensuring everything is up to date it sticks on the exact same line when debugging. |
Anyone have any ideas why this is stuck in Rosetta 2 but regular app debugging works? |
For my .net core apps I can run without debugging but when debugging always stops after the first Loading line as described above |
@cdasso Can you please confirm if this is a .NET Core functions app or another type of .NET Core app? |
Same here, running in debug doesn't work for any of my asp.net core (3.1) or console applications. Output doesn't go further then "Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/3.1.9/System.Private.CoreLib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.". When creating a new .net 5.0 asp net core mvc application it crashes with the following message after trying to start in debug:
|
Hey there – I work on the Visual Studio for Mac team. We've been tracking an issue with debugging .NET Core applications on the M1 processor. There's a bug fix coming with the 11.2 release of Big Sur, which is in beta now, and with that it fixes the issue – I confirmed on my own M1 device just today. We'll update our issue tracker once 11.2 is released. |
Hey @jmatthiesen, I encountered this same issue. I upgraded to 11.2 Big Sur and I can now debug in Visual Studio. |
I'm on Big Sur 11.6 and still encounter this issue. I can run the azure functions reliably, but shortly after attaching to the process with the debugger in vs code the functions lock up and the func process has to be force quit. Sometimes I can hit a breakpoint but shortly after stopping on the first breakpoint the function host will lock up. |
For those coming to this page looking for a possible solution I am posting what is now working well for me after trying many combinations of .NET core, azure function core tools, and IDEs (both x64/Rosetta and arm64 versions). Almost all scenarios resulted in being able to execute the azure functions, but the azure functions would run very slowly and eventually completely lock up azure function core tools shortly after attaching a debugger to the process. I now have .NET CORE SDK 3.1.414, .NET CORE SDK 2.1.818, Azure Function Core tools 2.7.3188, and Visual Studio for Mac community v 8.10.11 (build 8). |
Consolidating M1 issues. Sounds like the root problem for this issue was fixed as of this comment: #2303 (comment). For general M1 support (we know there are still problems), we will use #2834 for tracking going forward |
When using Apple Silicon m1 Processor starting a debug session in Rider or Visual Studio for Mac hangs at the following console output:
Visual Studio for Mac:
Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/3.1.9/System.Private.CoreLib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
JetBrains Rider:
/Applications/Rider.app/Contents/lib/ReSharperHost/macos-x64/dotnet/dotnet exec /Applications/Rider.app/Contents/lib/ReSharperHost/JetBrains.Debugger.Worker.exe --mode=client --frontend-port=52885 --plugins=/Applications/Rider.app/Contents/plugins/rider-unity/dotnetDebuggerWorker
Loaded application domain 'DefaultDomain (id 1)'
Loaded Assembly '/Library/Application Support/AzureFunctions/System.Private.CoreLib.dll'
Loading module /Library/Application Support/AzureFunctions/System.Private.CoreLib.dll in application domain 1:DefaultDomain
Pdb file for assembly /Library/Application Support/AzureFunctions/System.Private.CoreLib.dll was not found or failed to read
Running without debugging works normally, but debugging is not currently possible because of this.
The text was updated successfully, but these errors were encountered: