Is it possible in C# to see the traces in a separate console. For example, I am having a window based application in which there are trace statements that will write the currently executed method name in to the console. When I run this application, it should automatically open a console and start the traces. Is this possible?
If you set the project type of your window application to Console, it will open a console window when you run it.
You can create a console window by calling the Win32 AllocConsole API through P/Invoke.
http://pinvoke.net/default.aspx/kernel32/AllocConsole.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With