Bug 6508 - Android: Stack trace does not show filename or line number
Summary: Android: Stack trace does not show filename or line number
Status: RESOLVED FEATURE
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.2.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-08-12 06:10 UTC by David N. Junod
Modified: 2012-09-20 14:23 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FEATURE

Description David N. Junod 2012-08-12 06:10:12 UTC
When running on the Android, when a crash occurs, it does not show filename or line number in the stack trace for the exception.

Does on MonoTouch.
Comment 1 Mike 2012-09-18 13:33:22 UTC
I am also seeing this problem in Android using a Windows development machine.
Comment 2 David N. Junod 2012-09-18 16:19:44 UTC
I also see this with MonoMac.  I don't see it with MonoTouch.
Comment 3 Atsushi Eno 2012-09-20 04:28:36 UTC
To see line numbers in debug mode, you need to set adb shell property as explained here. Try running from command line: adb shell setprop debug.mono.debug 1
http://docs.xamarin.com/android/advanced_topics/diagnostics#Mono_for_Android_System_Properties
Comment 4 David N. Junod 2012-09-20 06:38:21 UTC
How do you know that?  The doc pointer you pointed me to does *not* say that.

"debug.mono.debug: If a non-empty string, this is equivalent to `mono --debug`."
Comment 5 Atsushi Eno 2012-09-20 06:49:20 UTC
Right, that's fair enough: I knew it only because I am also a mono developer. I'd ask our doc team to see if there's better way to explain that. Thanks for the feedback.
Comment 6 Jonathan Pryor 2012-09-20 14:23:22 UTC
How are you launching the app? File + line information should be present within stack traces if you Debug your app from the IDE, e.g. MonoDevelop Run > Start Debugging.

It's only if you launch your app "manually" from the Android Home screen or Run your app (without debugging) that  you won't get file + line number information. The reason for this is that `mono --debug` (the equivalent to setting debug.mono.debug) increases memory use and has various other implications.

MonoTouch should be the same, in that `mono --debug` is not the default behavior for all apps, all the time.