[Mono-list] Line numbers in exceptions

Jonathan Gagnon jonathan.gagnon at croesus.com
Thu Apr 26 10:52:31 EDT 2007

Thanks for the information.  IMO, that would be a good tip to put in the
mono debugging page (http://www.mono-project.com/Debugging).

Little question : Using the mdb I created with pdb2mdb, I now get the line
numbers, but the offset is different and the column is 0.  Is it normal?

Also, they say on the debugging page that using the --debug command line
option will result in slower execution.  How much slower is this to use that
option?  Have you ever made benchmarks for this?



-----Message d'origine-----
De : mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] De la part de Robert Jordan
Envoyé : Thursday, April 26, 2007 5:12 AM
À : Mono-list at lists.ximian.com
Objet : Re: [Mono-list] Line numbers in exceptions


Rolf Bjarne Kvinge wrote:
>> From: mono-list-bounces at lists.ximian.com
> [mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Jonathan 
> Gagnon
>> Sent: miércoles, 25 de abril de 2007 19:15
>> To: mono-list at lists.ximian.com
>> Subject: [Mono-list] Line numbers in exceptions
>> Hi,
>> I have a program that is compiled with Visual Studio.  When I run it 
>> in
> .NET, I get the line numbers in the string generated by 
> Exception.ToString().  But when I run it with Mono, I don't get the 
> line numbers.  I tried using the -->debug flag and it doesn't change 
> anything, I still don't have the line numbers.  I suspect that this is 
> because I compiled my application with Visual Studio and that Mono 
> can't use the .pdb files.  Am I right?  If I am right, is >there a way 
> to at least get the IL offset in the file?  It seems to always return 0 in
my case.
> Mono can't read pdb files, you have to recompile the assemblies with 
> any of the mono compilers (mcs / gmcs) in order to get the line numbers.

You may use this tool to convert pdbs to mdbs:



Mono-list maillist  -  Mono-list at lists.ximian.com

More information about the Mono-list mailing list