Debugging in TB

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Debugging in TB

Philip Prindeville
What's the preferred way to pepper code (temporarily) with debugging
statements in TB, and where does the output get sent?  I tried using
fprintf(stderr, ...) but apparently stderr gets closed.

So, I could use PR_LOG()...  but where does it get sent?  And does
anything need to be turned on to enable it?

Thanks,

-Philip

_______________________________________________
mozilla-general mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-general
Reply | Threaded
Open this post in threaded view
|

Re: Debugging in TB

Frank Wein
Philip Prindeville wrote:
> What's the preferred way to pepper code (temporarily) with debugging
> statements in TB, and where does the output get sent?  I tried using
> fprintf(stderr, ...) but apparently stderr gets closed.

Normally you could just send your output to stdout and it will appear in
console (at least that is how i know it), no?

> So, I could use PR_LOG()...  but where does it get sent?  And does
> anything need to be turned on to enable it?

PR_LOG is part of the so called NSPR logging function, it depends on
which log module gets used in this source file (if any). For more
general information see
http://www.mozilla.org/projects/nspr/reference/html/prlog.html, for a
concrete example of logging (here: logging of NNTP or IMAP or POP or
SMTP protocol) see
http://www.mozilla.org/quality/mailnews/mail-troubleshoot.html#pop. Of
course you can also create your own logging module if you want.

Frank
_______________________________________________
mozilla-general mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-general
Reply | Threaded
Open this post in threaded view
|

Re: Debugging in TB

Christian Biesinger
In reply to this post by Philip Prindeville
Philip Prindeville wrote:
> What's the preferred way to pepper code (temporarily) with debugging
> statements in TB, and where does the output get sent?  I tried using
> fprintf(stderr, ...) but apparently stderr gets closed.

It doesn't get closed... printing to stderr should work.
_______________________________________________
mozilla-general mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-general
Reply | Threaded
Open this post in threaded view
|

Re: Debugging in TB

Philip Prindeville
Christian Biesinger wrote:

> Philip Prindeville wrote:
>
>> What's the preferred way to pepper code (temporarily) with debugging
>> statements in TB, and where does the output get sent?  I tried using
>> fprintf(stderr, ...) but apparently stderr gets closed.
>
>
> It doesn't get closed... printing to stderr should work.



Well, for 1.0.7 on Linux, nothing is coming out (and yes, the code is being
reached).

-Philip

_______________________________________________
mozilla-general mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-general