Every once in a while I need to debug some Mono program that does not come with a solution. Either a program that was compiled using a Makefile or an executable that I installed with RPM on my system.
Sometimes I would end up cretaing MonoDevelop solution that contained every source file, command line option and resource that I meticulously copied from the Makefile. In other words, I was in for a world of pain just to be able to use MonoDevelop's awesome debugger.
Lluis offered this solution, and I am blogging it hoping that it will help someone else in the future. Follow these steps to debug a Mono executable and set breakpoints on the source code or class libraries source code:
Select File/New Solution and select Generic Solution:
Double click on your project, in my case I called the project "compiler":
In your project select Custom Commands:
Add a custom Execute command by selecting it from the "Select a Project Operation" option and point to your Mono executable:
Use File/Open to load the source file where you want to set a breakpoint (the executable source or some class library source) and set your breakpoints:
Then use Run/Debug to start your program in debugging mode (Linux and Windows users can use F5, MacOS X users can use Command-Return).
Posted on 20 Feb 2010