Redirect Console I/O?

  • Thread starter Thread starter Schorschi
  • Start date Start date
S

Schorschi

Ok, I have my own console class that lets me allocate a console, free
it, etc. in my windows vb .net application, hell it even hides the
cursor, set colors, etc. But the one thing I want to do is redirect
the standard console class text from the 'output' in the VS IDE to my
console window during debug sessions, when not debugging, everything
works fine... so how do I get VS IDE to use my window not 'output'?

Thx.
 
Ok, I have my own console class that lets me allocate a console, free
it, etc. in my windows vb .net application, hell it even hides the
cursor, set colors, etc. But the one thing I want to do is redirect
the standard console class text from the 'output' in the VS IDE to my
console window during debug sessions, when not debugging, everything
works fine... so how do I get VS IDE to use my window not 'output'?

Let me get this right, the console class is inside of the application being
"debugged"? If that is the case, just don't call debug.writeline or
console.writeline, and call your console's output method instead.

If you mean that the console class is inside of a different application from
the one being debugged and you want debugging messages to be displayed
there, then you must make a debugger. You're application would have to be
registered as the default debugger on the system, but to do this I am not
sure how. I should imagine it would require quite a bit of work!, maybe
someone else here could offer that advice.

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 
Hi Schorschi,

The VS IDE contains a whole heap of classes for automation. Find the help topic called: Extending the Visual Studio Environment.
This is where you'll need to be doing some learning.

I've not played with it much myself, but I'm guessing that you can either trap the events of the Output Window and send a copy
of all output to your own Console, or you can derive a class from the Output Window (to send blah, blah) which you can then hook
into the IDE in place of the original.

Good luck,
Fergus
 
Back
Top