Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to remote debug a C# mono app running on linux with Visual Studio 2013

I am considering developing several console/service type apps for Linux using Mono C#.

My preferred development environment would be Windows with Visual Studio 2013.

Are there any solutions for remote debugging a Mono C# console process running on Linux with Visual Studio 2013?

In an ideal solution a simple F5 would deploy build output to the remote linux host, start the app on the host and then attach a debugger so that I can locally use all the standard debugging capabilities of Visual Studio 2013 (break points, stacktrace, watch window, etc...)

Is this even possible at present? This add-in here (http://www.giesswein-apps.at/mono) seems like a nice solution but it looks fairly new and I can't tell if it's only for RaspberryPi.

I understand Xamarin provides solutions to cross platform mobile development but do they have any solutions that might make C# Linux development easier?

like image 606
gmetzker Avatar asked Sep 13 '14 18:09

gmetzker


People also ask

How do I run Msvsmon EXE?

You can start the remote debugger from the command line with the /allow <username> parameter: msvsmon /allow <username@computer> You can add the user to the remote debugger's permissions (in the remote debugger window, Tools > Permissions).


1 Answers

The MonoDebugger add-in you linked definitely works on the PC as well, so it's not limited to the RaspberryPi. I have tried it, but as you said it's still fairly new and I found some bugs e.g. while stepping through a while-loop.

Debugging a remote Mono process should also be possible with MonoDevelop/Xamarin Studio, but it's apparently not something you can do out of the box: http://tirania.org/blog//archive/2013/Oct.html

like image 56
Alexander Köplinger Avatar answered Oct 04 '22 09:10

Alexander Köplinger