[Mono-list] Why doesn't Mono include full stack trace information into exception?

David Curylo curylod at asme.org
Mon Dec 30 13:42:47 UTC 2013


You need to tell mono to create the debugging symbols when building.

mcs -debug ConsoleApplication2.cs

You should see ConsoleApplication2.exe.mdb in the output directory, and now when you run with the --debug option you should see line numbers in the stack trace.

Please keep in mind you are telling the compiler to generate debugging symbols, and not actually telling it to build a debug release.  This is the same behavior as you would see on MS .NET by calling the compiler as follows:

csc /debug ConsoleApplication2.cs

I would recommend building with this option and keeping debugging symbols archived with any of your releases even if you don’t ship them to customers by default. Then if someone encounters an issue and you need line numbers in the stack trace, you can provide the symbols for that release and get detailed stack traces.

On Dec 30, 2013, at 8:04 AM, Andrei Faber <andrei.faber at gmail.com> wrote:

> it doesn't seem to change anything
> mono.exe --debug ConsoleApplication2.exe
> System.ApplicationException: An application exception has occurred.
>  at ConsoleApplication2.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20131230/6def4074/attachment.html>


More information about the Mono-list mailing list