views:

446

answers:

2

Is there an easy way to do this?

I am testing my networking application using just the console for now. What would be nice is to have multiple consoles from one project and one press of the "Debug Now" menu item.

I could, like I have in the past, use multiple projects but that's seems unwieldy. Ideally I could launch multiple console instances (running from the same thread is fine) and have them not cover the other consoles when they do launch. Launching side by side would be awesome!

How practical is what I'm asking? Is it possible?

Thanks!

+4  A: 

There is no easy way to do this.

Technically, you can create a separate console for an application, but it requires creating a child process to host the console. There is a CodeProject article showing the basic procedure.

That being said, at the point where you want multiple "windows" showing data, I think migrating to a (simple) GUI application is a better choice.

Reed Copsey
That's what I've thought for awhile. Wanted to avoid it but looks like I can't.
bobber205
Well, there is a way to do it. Read the article - it lets you have a single process, and you use child process instances just for the console (but not the logic). It's clunky, but works.
Reed Copsey
A: 
System.Diagnostics.Process.Start("MyOtherProgram.exe");
ChaosPandion
I assume I cannot debug that process?
bobber205
You can attach another visual studio to it once it is launched to debug it.
DaMacc
Yeah that's what I was about to say.
ChaosPandion
Its clunky but should get you want you need.
ChaosPandion