MonoDevelop No Output with System.Diagnostics.Debug.WriteLine

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

MonoDevelop No Output with System.Diagnostics.Debug.WriteLine

Dennis Quebe

Just updated to the latest B2 version of MonoDevelop with the Mono for Android add-in already installed and I created the basic standard template project for testing. Right at the beginning of the OnCreate method, I am writing a “HERE” message using System.Diagnostic.Debug.WriteLine. I do not see any output in MonoDevelop (looking under a couple of different windows, but specifically under “Application Output”). I use the “Android.Util.Log.Info” method, and it writes the output. Am I looking in the wrong place for the listener for the Debug output? If I only use the Log, will these be compiled out when the configuration is set to “Release” versus “Debug”? See lines added below.

 

Thanks.

Dennis Quebe

 

System.Diagnostics.Debug.WriteLine ("HERE");

Android.Util.Log.Info ("MyApp", "HERE2");


_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MonoDevelop No Output with System.Diagnostics.Debug.WriteLine

warren burch
Under View\Other Windows there is "Android Device Logging" I think it is supposed to appear there (you need to select which device)

but when I do...

            Android.Util.Log.Error("APP", "HELLO WORLD");

I dont see that show up as I expect. What am I doing wrong?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MonoDevelop No Output with System.Diagnostics.Debug.WriteLine

Jonathan Pobst
The log doesn't automatically refresh.  Did you hit the refresh button
after you wrote the message?

Jonathan


On 4/15/2011 11:34 PM, warren burch wrote:

> Under View\Other Windows there is "Android Device Logging" I think it is
> supposed to appear there (you need to select which device)
>
> but when I do...
>
>              Android.Util.Log.Error("APP", "HELLO WORLD");
>
> I dont see that show up as I expect. What am I doing wrong?
>
>
> --
> View this message in context: http://mono-for-android.1047100.n5.nabble.com/MonoDevelop-No-Output-with-System-Diagnostics-Debug-WriteLine-tp4306652p4306952.html
> Sent from the Mono for Android mailing list archive at Nabble.com.
> _______________________________________________
> Monodroid mailing list
> [hidden email]
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>

_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MonoDevelop No Output with System.Diagnostics.Debug.WriteLine

warren burch
Jonathan Pobst wrote
The log doesn't automatically refresh.  Did you hit the refresh button
after you wrote the message?

Thanks Jonathan, Yes, I did refresh, I didnt see these messages. I see that if you use adb directly you need to use setprop to signal which tags you want to show. I dont see any way in th VS UI (expected it under project properties?) to do a setprop. I tried to piggyback another tag that I saw being written successfully into the log by changing my code to read

            Android.Util.Log.Error("ActivityManager", "ERROR HELLO WORLD");

But still - no joy. What am I doing wrong?

Cheers
Warren
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MonoDevelop No Output with System.Diagnostics.Debug.WriteLine

Dennis Quebe
In reply to this post by warren burch
I get the output from the Log, but not from Debug.WriteLine. It does not
show up under that window or the "Application Output" window.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of warren burch
Sent: Friday, April 15, 2011 11:35 PM
To: [hidden email]
Subject: Re: [mono-android] MonoDevelop No Output with
System.Diagnostics.Debug.WriteLine

Under View\Other Windows there is "Android Device Logging" I think it is
supposed to appear there (you need to select which device)

but when I do...

            Android.Util.Log.Error("APP", "HELLO WORLD");

I dont see that show up as I expect. What am I doing wrong?


--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/MonoDevelop-No-Output-with-Sys
tem-Diagnostics-Debug-WriteLine-tp4306652p4306952.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MonoDevelop No Output with System.Diagnostics.Debug.WriteLine

Dennis Quebe

To further the discussion, when I create a simple Console application and use "Debug.WriteLine" it does output the text to "Application Output" as expected. Makes me wonder if the listener isn't being assigned correctly under the Mono application. I am going to do a little more testing and then open a bug report.

 

-----Original Message-----
From: Dennis Quebe [mailto:[hidden email]]
Sent: Saturday, April 16, 2011 8:04 AM
To: 'Discussions related to Mono for Android'
Subject: RE: [mono-android] MonoDevelop No Output with System.Diagnostics.Debug.WriteLine

 

I get the output from the Log, but not from Debug.WriteLine. It does not show up under that window or the "Application Output" window.

 

-----Original Message-----

From: [hidden email]

[mailto:[hidden email]] On Behalf Of warren burch

Sent: Friday, April 15, 2011 11:35 PM

To: [hidden email]

Subject: Re: [mono-android] MonoDevelop No Output with System.Diagnostics.Debug.WriteLine

 

Under View\Other Windows there is "Android Device Logging" I think it is supposed to appear there (you need to select which device)

 

but when I do...

 

            Android.Util.Log.Error("APP", "HELLO WORLD");

 

I dont see that show up as I expect. What am I doing wrong?

 

 

--

View this message in context:

http://mono-for-android.1047100.n5.nabble.com/MonoDevelop-No-Output-with-Sys

tem-Diagnostics-Debug-WriteLine-tp4306652p4306952.html

Sent from the Mono for Android mailing list archive at Nabble.com.

_______________________________________________

Monodroid mailing list

[hidden email]

 

UNSUBSCRIBE INFORMATION:

http://lists.ximian.com/mailman/listinfo/monodroid

 


_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MonoDevelop No Output with System.Diagnostics.Debug.WriteLine

Dennis Quebe

I cannot do further testing because there are no Listener objects in the Mono libraries, or a way to get to the Debug listeners. So, I have to assume this is a bug.

 

From: Dennis Quebe [mailto:[hidden email]]
Sent: Saturday, April 16, 2011 9:40 AM
To: 'Discussions related to Mono for Android'
Subject: RE: [mono-android] MonoDevelop No Output with System.Diagnostics.Debug.WriteLine

 

To further the discussion, when I create a simple Console application and use "Debug.WriteLine" it does output the text to "Application Output" as expected. Makes me wonder if the listener isn't being assigned correctly under the Mono application. I am going to do a little more testing and then open a bug report.

 

-----Original Message-----
From: Dennis Quebe [mailto:[hidden email]]
Sent: Saturday, April 16, 2011 8:04 AM
To: 'Discussions related to Mono for Android'
Subject: RE: [mono-android] MonoDevelop No Output with System.Diagnostics.Debug.WriteLine

 

I get the output from the Log, but not from Debug.WriteLine. It does not show up under that window or the "Application Output" window.

 

-----Original Message-----

From: [hidden email]

[mailto:[hidden email]] On Behalf Of warren burch

Sent: Friday, April 15, 2011 11:35 PM

To: [hidden email]

Subject: Re: [mono-android] MonoDevelop No Output with System.Diagnostics.Debug.WriteLine

 

Under View\Other Windows there is "Android Device Logging" I think it is supposed to appear there (you need to select which device)

 

but when I do...

 

            Android.Util.Log.Error("APP", "HELLO WORLD");

 

I dont see that show up as I expect. What am I doing wrong?

 

 

--

View this message in context:

http://mono-for-android.1047100.n5.nabble.com/MonoDevelop-No-Output-with-Sys

tem-Diagnostics-Debug-WriteLine-tp4306652p4306952.html

Sent from the Mono for Android mailing list archive at Nabble.com.

_______________________________________________

Monodroid mailing list

[hidden email]

 

UNSUBSCRIBE INFORMATION:

http://lists.ximian.com/mailman/listinfo/monodroid

 


_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MonoDevelop No Output with System.Diagnostics.Debug.WriteLine

Jonathan Pobst
In reply to this post by warren burch
By default, logcat returns all messages, with no filtering.

I just tested this to make sure it works, and my error message is
written to logcat as expected.

Are you sure your logging statement is being hit?

Jonathan


On 4/16/2011 12:15 AM, warren burch wrote:

>
> Jonathan Pobst wrote:
>>
>> The log doesn't automatically refresh.  Did you hit the refresh button
>> after you wrote the message?
>>
>
>
> Thanks Jonathan, Yes, I did refresh, I didnt see these messages. I see that
> if you use adb directly you need to use setprop to signal which tags you
> want to show. I dont see any way in th VS UI (expected it under project
> properties?) to do a setprop. I tried to piggyback another tag that I saw
> being written successfully into the log by changing my code to read
>
>              Android.Util.Log.Error("ActivityManager", "ERROR HELLO WORLD");
>
> But still - no joy. What am I doing wrong?
>
> Cheers
> Warren
>
> --
> View this message in context: http://mono-for-android.1047100.n5.nabble.com/MonoDevelop-No-Output-with-System-Diagnostics-Debug-WriteLine-tp4306652p4306977.html
> Sent from the Mono for Android mailing list archive at Nabble.com.
> _______________________________________________
> Monodroid mailing list
> [hidden email]
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>

_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MonoDevelop No Output with System.Diagnostics.Debug.WriteLine

Jeppsson, Daniel
In reply to this post by Jonathan Pobst


Dennis Quebe <[hidden email]> wrote:



To further the discussion, when I create a simple Console application and use "Debug.WriteLine" it does output the text to "Application Output" as expected. Makes me wonder if the listener isn't being assigned correctly under the Mono application. I am going to do a little more testing and then open a bug report.



-----Original Message-----
From: Dennis Quebe [mailto:[hidden email]]
Sent: Saturday, April 16, 2011 8:04 AM
To: 'Discussions related to Mono for Android'
Subject: RE: [mono-android] MonoDevelop No Output with System.Diagnostics.Debug.WriteLine



I get the output from the Log, but not from Debug.WriteLine. It does not show up under that window or the "Application Output" window.



-----Original Message-----

From: [hidden email]

[mailto:[hidden email]] On Behalf Of warren burch

Sent: Friday, April 15, 2011 11:35 PM

To: [hidden email]

Subject: Re: [mono-android] MonoDevelop No Output with System.Diagnostics.Debug.WriteLine



Under View\Other Windows there is "Android Device Logging" I think it is supposed to appear there (you need to select which device)



but when I do...



            Android.Util.Log.Error("APP", "HELLO WORLD");



I dont see that show up as I expect. What am I doing wrong?





--

View this message in context:

http://mono-for-android.1047100.n5.nabble.com/MonoDevelop-No-Output-with-Sys

tem-Diagnostics-Debug-WriteLine-tp4306652p4306952.html

Sent from the Mono for Android mailing list archive at Nabble.com.

_______________________________________________

Monodroid mailing list

[hidden email]<mailto:[hidden email]>



UNSUBSCRIBE INFORMATION:

http://lists.ximian.com/mailman/listinfo/monodroid


_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MonoDevelop No Output with System.Diagnostics.Debug.WriteLine

Jonathan Pryor
In reply to this post by Dennis Quebe
On Apr 16, 2011, at 10:48 AM, Dennis Quebe wrote:
> I cannot do further testing because there are no Listener objects in the Mono libraries, or a way to get to the Debug listeners.

System.Diqagnostics.TraceListener & co. are not part of the Silverlight-based Mono for Android profile, and is thus by design.

Debug.WriteLine() is equivalent to Console.WriteLine() (literally [0]), the output of which is only visible when you're debugging (and not at all visible on OSX atm, due to a bug).

 - Jon

[0] https://github.com/mono/mono/blob/master/mcs/class/System/System.Diagnostics/Debug_2_1.cs#L72

_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MonoDevelop No Output with System.Diagnostics.Debug.WriteLine

Dennis Quebe

Understood. Thanks for the Link. I didn't know if to expect "Console.WriteLine" to write the output to the "Application Window" under MonoDevelop or not (it does not work just like the Debug.WriteLine as expected). I have that same bug on MonoDevelop on Windows.

 

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Jonathan Pryor
Sent: Sunday, April 17, 2011 3:59 PM
To: Discussions related to Mono for Android
Subject: Re: [mono-android] MonoDevelop No Output with System.Diagnostics.Debug.WriteLine

 

On Apr 16, 2011, at 10:48 AM, Dennis Quebe wrote:

> I cannot do further testing because there are no Listener objects in the Mono libraries, or a way to get to the Debug listeners.

 

System.Diqagnostics.TraceListener & co. are not part of the Silverlight-based Mono for Android profile, and is thus by design.

 

Debug.WriteLine() is equivalent to Console.WriteLine() (literally [0]), the output of which is only visible when you're debugging (and not at all visible on OSX atm, due to a bug).

 

- Jon

 

[0] https://github.com/mono/mono/blob/master/mcs/class/System/System.Diagnostics/Debug_2_1.cs#L72

 

_______________________________________________

Monodroid mailing list

[hidden email]

 

UNSUBSCRIBE INFORMATION:

http://lists.ximian.com/mailman/listinfo/monodroid


_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
Loading...