Equivalent to Debug.WriteLine in MonoTouch / MonoDroid?

What is equivalent to Debug.WriteLine for MonoTouch or MonoDroid?

Here is the guide for MonoDroid: http://monodroid.net/Documentation/Guides/Android_Debug_Log

+6
debugging c # xamarin.android
source share
3 answers

For MonoTouch Console.WriteLine will appear in MonoDevelop and in the logs from your iOS device.

For MonoDroid, you can use the Android.Util.Log class to register debugging, information, errors, etc., which you can view using the Android Debug Bridge logarithm (adb logcat). An example would be such an announcement for an informational message: Android.Util.Log.Info ("Barcode", "Scan button pressed.")

+8
source share

Mono for Android provides Debug.WriteLine () , like MonoTouch, so I'm not sure why you need a workaround.

Debug.WriteLine() displayed in MonoDevelop (during debugging), and is also copied to the Android debug log with the mono-stdout tag. System.Console output is also copied to the Android debug log with the mono-stdout ( Console.Out ) and mono-stderr ( Console.Error ) tags.

+6
source share

You can use System.Console.WriteLine with Monotouch and Monodroid to output debugging.

0
source share

All Articles