Run and Debug on Mono
Often, the best way to work through an issue will be to debug the application on
the target environment. Debug on Mono brings this functionality to Visual
Studio developers by enabling local debugging of Mono applications on Windows
or remote debugging on Linux and Mac.
Step 1:
Open your solution in Visual Studio and ensure it compiles.
Step 2:
Set your breakpoints like you would normally do.
Step 3:
Select the Mono->Debug in Mono menu item.
Step 4:
A dialog box will prompt you to choose from Mono profiles you have available
for running and debugging Mono applications. If you have not created a
profile, you can click the "Create Profile" link to create a new configuration for a
local or remote Mono installation.
Alternatively, you can enter server details
in the "Quick Launch" section on the right to run against a remote server instance
without creating a new configuration.
If you choose to create a new profile, you will have the option to specify the
path to a locally installed version of Mono, or you can select "Remote Server"
and specify a server name and port for a remote machine running the Mono Tools
remote server
In order to find servers on the local subnet when configuring a remote server, UDP is
used to broadcast over port 1900 using the multicast address 239.255.255.250. If your
server is not appearing, you may want to check your firewall settings.
You can either leave the profile name blank or give it a descriptive name.
Step 5:
Your application will be compiled, copied over to Linux, and automatically started.
If it is a web application, it will be launched in your default Windows web browser.
Step 6:
When the application hits the breakpoint, it will stop in Visual Studio, just like
normal. From here, you can do the normal debug actions, like examine variables and
call stacks.