How do I use Debug.WriteLine?

  • Thread starter Thread starter Jim H
  • Start date Start date
J

Jim H

The documentation says that Debug.WriteLine and TraceListener.WriteLine are
supported by the compact framework, but When I try calling these methods I
get no output in my debug window? How do I print debug info to my debug
window?

jim
 
Define "my debug window". When I do Debug.WriteLine, a new window is opened
on the device (behind the main form of my application), and the text is
printed there.

Paul T.
 
The Visual Studio .NET debug window does not intercept debug or trace
messages. But they are being produced on the handheld. You can write a
custom listener and save to a text file or do something a little more
abitious:

Tracing for Compact Framework apps
http://www.codeproject.com/csharp/CompactTcpTrace.asp?target=debug|compact|framework

This will allow you to see debug messages on the Desktop but not the Visual
Studio .NET IDE. You could take the next step since it is close.

Alex Feinman has a great suggestion for creating a LogFileListener:
http://groups.google.com/groups?hl=...q=txt+tracelistener+compact+framework&spell=1

Thanks,
Chris Craft
http://www.cjcraft.com/
 
Back
Top