dwmkerr/consolecontrol

Attach an existing process output to console control

Opened this issue · 3 comments

Hi,

I'm developing a WPF application, and I would like to know If I can attach the console output of that application to the Console control.

For example I would like to open a new windo with a button and show in that window the consolecontrol with the Nlog output of the main application.

Regards

Franco

This issue is what I was searching on Stackoverflow and Google. I'm pretty surprised.

My attempt was adding a troubleshooting button on my own WPF window component that opens a new console window. So that I can see the trace output when I interact with the window. So that I -or help desk guy- can recreate the error in the help desk ticket without needing to open the solution in VS. Because help desk can't and shouldn't. I need to help them diagnose better and give the development more meaningful insight to help solving the issue. And if it is not a bug but a user fault or a user fault that occurs because of bad UI, they can help the user asap and give us a suggestion to develop the UI.

Am interested too, did you figure it out?

string arg1 = "myprogram.exe";
string arg2 = "-h";
console.StartProcess(arg1, arg2);

or

console.StartProcess("myprogram.exe", null);