How to debug Xamarin and Mono class library with Visual Studio for Mac12 Jan 2018
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:
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:
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/126.96.36.199/src
Finally, rename the folder in mono: