[Mono-dev] Howto debug Mono and dev tools

Jonathan Pryor jonpryor at vt.edu
Thu Nov 10 06:48:17 EST 2005

On Thu, 2005-11-10 at 12:46 +0200, Christopher Bergström wrote:
> Quick questions
> 1) What are the recommended tools for debugging mod_mono/xsp/mono? If
> it's mono debugger or just recompile with --debug options I apologize
> for such an obvious question. I especially need to know for a server
> with X11 forwarding off. (I've been reading about Mono debugger, but
> have yet to use it. Is it really that great?)

The debugger is, has been, and will likely continue to be a
work-in-progress.  It is not currently usable by mere mortals.

Which leaves *.WriteLine and log files as your "debugging" mechanism --
Console.WriteLine() (not suitable for mod_mono), Console.Error.WriteLine
(sent to Apache's error_log), System.Diagnostics.Trace.WriteLine()...

For System.Diagnostics.Trace, you'll probably want to set the
(XPath) /configuration/system.diagnostics/assert/@logfilename attribute
in your .config file (app-name.exe.config or web.config), e.g.:

	    <assert logfilename="your-log-file.txt" />

You can also add additional TraceListeners to send output to additional
files if necessary.  You might find this interesting:


If using System.Diagnostics.Trace, don't forget to compile your code
with the TRACE symbol defined, e.g. with ``#define TRACE''.

> 2) Do I submit patches in standard format? Is it preferred to diff
> against svn head or latest release? (I'll look on the site for something
> on submitting patches)

Diffs need to be in unified-diff format (e.g. `diff -upN`).  The default
`svn diff` output is in unified-diff format, and is thus acceptable.  

Diffing against svn-head is easiest for us to deal with, as the code may
have changed (possibly fixing your bug) since the last release.

> 3) Tools for development reopened...

What, no (g) -- vim/emacs and a command line?  Works great remotely when
X11 forwarding is off.

>     c. MonoDevelop (tried it about a year ago.. Has it gotten
> significantly better?)

Define "significantly".  I've heard the more recent versions are more
stable, but I don't use it.

> Is there anything that will allow a preview window for
> .xml/.html/xhtml/.aspx based pages. (Don't need WYSIWYG editor)
> Must work in Linux
> Built-in debugger
> FTP/SFTP/SVN/CSV support
> Project explorer and quick navigation
> Autocompletion?
> Fast and not using Java?
> Open source?

Nothing has all of those features, because one of them doesn't currently
exist -- a "Built-in debugger."  You've already mentioned several
programs which will handle some of the items on that list, MonoDevelop
in particular, and I don't know of any unmentioned programs that would

 - Jon

More information about the Mono-devel-list mailing list