Debugging .NET 5 apps on your M1 Mac
In this short article, I’ll show you how to install .NET 5 on your M1 Mac and demonstrate how to debug your apps using VS Code and VS For Mac.
With macOS Big Sur 11.2 Beta 2, Apple fixed some of the bugs related to debugging your .NET 5 apps on M1 Macs, this allows you to debug .NET applications using VS Code, VS for Mac and even JetBrains Rider through the Rosetta 2 x86-to-ARM translator.
First, your Mac needs to be enrolled into the Beta program. This requires registering your Apple ID and downloading a tool that gives you access to beta builds of Big Sur. After installing that, your M1 Mac should be able to search for updates, on which you should get 11.2 Beta 2.
After installing the beta, download .NET 5 from the official website (macOS, x64).
You should now be able to run and debug .NET 5 apps on you M1 machine.
^ This also works with VS Code insiders built for M1!
Keep in mind that Beta means Beta. There are some cases on which the debugger crashes, let’s hope the stable release of Big Sur 11.2 addresses these issues.