PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Trace.WriteLine (Urgent)
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Trace.WriteLine (Urgent)
![]() |
Trace.WriteLine (Urgent) |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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 > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#4 |
|
Guest
Posts: n/a
|
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 > > |
|
|
|
#5 |
|
Guest
Posts: n/a
|
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 |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

