[Mono-list] How do you debug?

Miguel de Icaza miguel@ximian.com
04 Jul 2003 17:54:36 -0400


> Unhandled Exception: System.InvalidCastException: Cannot cast from source type 
> to destination type
> in <0x0007a> 00 System.Data.SqlClient.SqlDataReader:GetInt32 (int)
> in <0x00189> 00 Interesource.Publish.Client.ContentList:.ctor 
> (System.Data.IDataReader,bool)
> in <0x00012> 00 Interesource.Publish.Client.ContentList:.ctor 
> (System.Data.IDataReader)
> in <0x000a2> 00 Interesource.Publish.Client.ContentProvider:ListContentItems 
> (Interesource.Publish.Entities.ContentTypeKey)
> in <0x0009e> 00 simpletest.SimpleTest:Main (string[])
> Now, this code works on both Framework 1.0 and 1.1, so I'm guessing there is a 
> little work needed on the type casting for Mono. Without a debugger it's 
> going to be a nightmare trying to get it all working, so I'm hoping that 
> debugger will be available again soon.

A debugger will be coming (you can try the latest snapshot from
http://www.go-mono.com/archive/mono-debugger-0.4.tar.gz, that was
released today).

Now, a debugger can be useful, but ours is too new to be of big help
here.  In particular, we do not distribute by default debugger-enabled
versions of our assemblies, so that means that you would have to
rebuild the libraries yourself with debugging information.

The bug you show above happens inside the class libraries, in the
GetInt32 routine.  You can get the line number if you recompile the
class libs with -g, and run with --mono

Am sorry that there is not much else now.