[Mono-dev] Debugging Mono

Andy Somogyi andy_somogyi at hotmail.com
Wed Dec 28 12:57:03 EST 2005


Hello

What is the prefered way to debug a Mono application?

I've tried using mono directly using the following command:
mono -v  --break MWFTestApplication.MainWindow:Main swf-hello.exe

and I just get a series of exceptions.

I've tried using gdb using "gdb mono" then "run swf-hello.exe" to run the 
application and I just get a list of (no debug symbols found). Do I need to 
build mono itself with debug info? If I build mono with debug info, then 
inside gdb, would I issue a:
"run --break MWFTestApplication.MainWindow:Main swf-hello.exe"
to break at a specific point in the application I want to debug.

I have also tried to use mdb (I build it from svn), I run "mdb 
swf-hello.exe" then inside mdb I issue a "run" command then I just get the 
following error:
Mono Debugger
(mdb) run
Starting program: swf-hello.exe
** Message: WARNING: Running mdb as root may be a problem because setuid() 
and
seteuid() do nothing.
See http://primates.ximian.com/~martin/blog/entry_150.html for details.
The assembly mscorlib.dll was not found or could not be loaded.
It should have been installed in the `/usr/lib/mono/1.0/mscorlib.dll' 
directory.
Process @1 terminated normally.

Note, the application, swf-hello.exe runs fine by itself using mono, in 
fact, all the winforms test applications run fine, I just can not debug 
them.

I am doing someting wrong

any help would be greatly appreciated.

thanks





More information about the Mono-devel-list mailing list