Alternatives to the Output window for Debug info

C

chris

Hello all -

Preface: This isn't a C# Builder question but if you happen to have the
answer to my primary problem, please feel free to chime in ;-)


I'm using Borland's C# Builder (Personal) and it seems there isn't an Output
window (where the Debug.WriteLine() info would go) like VS has. If there
is, I can't find it. I would like to know if it is possible to write a
class with the ability to call a console window that would display the
Debug.WriteLine() info. I am currently working with Windows Forms. I have
read through some documentation but am currently at a loss. Any help would
be greatly appreciated. TIA\
 
V

Vadym Stetsyak

you can use Console.WriteLine()

And then bind to the StdOut, where you can read data written by
Console.WriteLine();
 
C

chris

Vadym said:
you can use Console.WriteLine()

And then bind to the StdOut, where you can read data written by
Console.WriteLine();


I did that. I was looking for the flexibility provided by the Debug.*
methods. It is nice to have debug statements that I know will easily
disappear when I switch to a release build.
 
C

Cezary Nolewajka

A good idea is to use the <trace> element of the application .config file.
You can decide during the
runtime of the Debug/Release (depending whether you use Debug/Trace class),
if the output is directed to any "Listener". You can even declare your own
classes as output sinks using the <listeners> element. This allows you to
send for instance the output to remote machine (TCP/IP?), WebService,
Window, etc. At your will.

Have a look at the following links:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrftraceelement.asp
http://msdn.microsoft.com/library/d...en-us/cpgenref/html/gngrflistenerselement.asp

A higher level runtime tracing tool is EIF (Enterprise Instrumentation
Framework):
http://www.microsoft.com/technet/tr...itsolutions/net/maintain/opnetapp/default.asp

Cezary Nolewajka
mailto:[email protected]
remove all "no-sp-am-eh"s to reply
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top