PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework Trace.WriteLine (Urgent)

Reply

Trace.WriteLine (Urgent)

 
Thread Tools Rate Thread
Old 06-09-2006, 08:12 PM   #1
Peter Morris [Droopy eyes software]
Guest
 
Posts: n/a
Default Trace.WriteLine (Urgent)


Hi all

I have an app that is performing some very complicated operations at a
certain point. Sometimes this takes 45 seconds, sometimes (on the same
data) it takes 5 minutes. I'd like to try to track down the cause of this
problem but stepping through the code doesn't help much because

1) It is recursive so too hard to mentally work out what is happening
2) It doesn't give me an idea of time

I wanted to use Trace.WriteLine to try to help me to work it out where the
delays are but sadly this doesn't exist in CF2. Is there an alternative I
can use to display trace messages?


Thanks

Pete


  Reply With Quote
Old 06-09-2006, 09:53 PM   #2
Guest
 
Posts: n/a
Default Re: Trace.WriteLine (Urgent)

You might look at the TextWriterTraceListener in the SDF - we use it
internally for a lot of this type of thing. It matches the same class name
in the FFx, so examples are easy to find if you need one.


--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--


"Peter Morris [Droopy eyes software]" <pete@droopyeyes.no.com.spam> wrote in
message news:uWRBehe0GHA.1300@TK2MSFTNGP05.phx.gbl...
> Hi all
>
> I have an app that is performing some very complicated operations at a
> certain point. Sometimes this takes 45 seconds, sometimes (on the same
> data) it takes 5 minutes. I'd like to try to track down the cause of this
> problem but stepping through the code doesn't help much because
>
> 1) It is recursive so too hard to mentally work out what is happening
> 2) It doesn't give me an idea of time
>
> I wanted to use Trace.WriteLine to try to help me to work it out where the
> delays are but sadly this doesn't exist in CF2. Is there an alternative I
> can use to display trace messages?
>
>
> Thanks
>
> Pete
>



  Reply With Quote
Old 07-09-2006, 08:27 AM   #3
Peter Morris [Droopy eyes software]
Guest
 
Posts: n/a
Default Re: Trace.WriteLine (Urgent)

Hi Chris

I'm confused! I don't get "Trace" in System.Diagnostics in CF2, and the URL
on MSDN that describes this class doesn't list CF as a supported platform.

Am I missing something?

Pete


  Reply With Quote
Old 07-09-2006, 12:52 PM   #4
Guest
 
Posts: n/a
Default Re: Trace.WriteLine (Urgent)

You're not missing anything, the CF is. As usual we have our own Trace
implementation:

http://opennetcf.org/library/OpenNE...ce2Members.html

http://opennetcf.org/library/OpenNE...nerMembers.html


--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--


"Peter Morris [Droopy eyes software]" <pete@droopyeyes.no.com.spam> wrote in
message news:%23cXaP8k0GHA.2036@TK2MSFTNGP05.phx.gbl...
> Hi Chris
>
> I'm confused! I don't get "Trace" in System.Diagnostics in CF2, and the
> URL on MSDN that describes this class doesn't list CF as a supported
> platform.
>
> Am I missing something?
>
> Pete
>
>



  Reply With Quote
Old 07-09-2006, 04:06 PM   #5
Peter Morris [Droopy eyes software]
Guest
 
Posts: n/a
Default Re: Trace.WriteLine (Urgent)

Oh right. I ended up writing my own. My MemoryTraceListener keeps a buffer
of a certain size and then only dumps to file if an unexpected exception
occurs. It works very well.

Thanks for your time Chris, I appreciate it!


Pete


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off