Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (25 sloc) 1.71 KB
published title date author layout permalink tags
true
How to debug Xamarin and Mono class library with Visual Studio for Mac
2018-01-12 08:58:11 UTC
fabiocozzolino
post
/how-to-debug-xamarin-and-mono-class-library-visual-studio-for-mac/
Xamarin
Xamarin.Forms
Visual Studio for Mac

Enabling the debugging of Xamarin or Mono class library in Visual Studio for Mac is really very simple and is well described in this page. The only step you need to do is uncheck the Debug project code only; do not step into framework code. in Visual Studio for Mac > Preferences > Debugger:

Visual Studio for Mac Enable Debug

But...

Even though the above page said Xamarin products ship with the source code for Mono's class libraries, I was unable to execute the debug after uncheck the above descripted option (the step into options doesn't work). The reason is simple: no source code is available in your machine!

So, to start debugging, you must download the Mono source code. Simply go to the Mono GitHub page, and select the tag related to your local mono version:

Mono tag selection

then, click on Clone or download > Download ZIP on the right side and unzip the file into the following folder: /Library/Frameworks/Xamarin.iOS.framework/Versions/11.6.1.3/src

Finally, rename the folder in mono:

Mono folder

And voilà:

Mono debug

You can’t perform that action at this time.