Archive for the ‘Mono’ Category

Remote Debugging with MonoDevelop

2013/12/04

This morning I tried to debug some Mono code in a Ubuntu 13.10 Saucy virtual machine that doesn’t have all the developer tools installed. Miguel de Icaza recently blogged about remote debugging, but it took a bit of fiddling to get it working. Here are my findings:

In the VM start your application with

mono --debug --debugger-agent="address=192.177.88.11:10000,transport=dt_socket,server=y" \
    /full/path/to/mono-application.exe

The IP address is the address of the VM, transport is a required argument, dt_socket seems to be the only allowed option. It is important to specify the full path to your managed application otherwise you’ll get an error that the application can’t be found.

Then on your developer machine set the environment variable MONODEVELOP_SDB_TEST and start MonoDevelop:

export MONODEVELOP_SDB_TEST=1
monodevelop-4.0

This adds a new menu item that allows to start a remote debugging session, under Run -> Run With -> Custom Command Mono Soft Debugger. This opens a dialog window; enter the IP address of your VM (192.177.88.11) and the port (10000) and start the session with the Connect button. This starts the application in the VM. Debugging works the same as if you would start the app locally. Great!

Cross-Platform Development and Data Type Sizes

2011/06/10

One of the problems when developing cross-platform apps is the question how long the intrinsic data types are on the different platforms. A while ago I created a table with the sizes of the different data types on 32- and 64-bit Windows and Linux, both for C++ and C#/.NET. (more…)

Lost Menu in Monodevelop in Unity

2011/06/07

Recently I got a new desktop computer on which I installed Ubuntu 11.04 Natty with the Unity UI. Yesterday I compiled Monodevelop 2.6 beta 3 (using the scripts described here) which worked fine – only when I run monodevelop the menu can’t be found anywhere: there is no menu in the monodevelop window nor in the global menu bar. Since it’s pretty hard to do any work without a visible menu, I decided to try to get this fixed. (more…)

Location of special folders on Linux

2011/04/14

One thing that always confuses me is how the special folders of Environment.SpecialFolder translate into real directories. Some are really obvious, especially on Windows, but on Mono on Linux it’s not so obvious. So I wrote a little app that tells where those folders are. (more…)

Debug.Assert and Mono

2009/05/06

On Microsoft’s .NET implementation on Windows a Debug.Fail() (which is equal to a Debug.Assert(false)) when run on a debug build displays a dialog box with the options Abort, Retry, Ignore. When run in the debugger it also displays the call stack.

On Mono however no dialog box shows; it behaves the same as when the user pressed ‘Ignore’. What’s worse is that it doesn’t display the call stack by default, even when run in debugger. This doesn’t give any hint if an exception happened. (more…)

Building MonoDevelop from SVN

2009/01/15

Yesterday I managed to build MonoDevelop from SVN source. I had done it before but had forgotten how to do it, and there are no fool-proof instructions on what you need to build. (more…)