Can a Forms Application trace to Console.Out?

J

james

Hi Guys,

Does anyone know a way to view tracing from a Forms Application in
real time? Currently our application traces to log files, but these
are cumbersome and have to be manually refreshed. For Console
applications we simple trace to Console.Out. Any help is appreciated.

Thanks,
James
 
N

Nicholas Paldino [.NET/C# MVP]

James,

Are you using the Trace mechanism in .NET? You should be providing a
trace provider which will write to the console.

That being said, you should be able to change your windows forms app to
a console app (in the project properties) and the console window should show
up. You might want to do this for debug builds only though.

Hope this helps.
 
J

james

Wow thanks Nicholas everything works fine. I thought switching
between Console and Windows Application would have bigger implications
than that.

Regards,
James
 
N

not_a_commie

All my winforms output logging data to the console. Early on in my
software I redirect the console to its own winforms textbox.
 

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