views:

939

answers:

3

We use Visual Studio 2008 for C# application development.

We launch three process when our applications comes up & we shutdown the launched processes when we close our application.

But often during debugging, we tend to close the debugger by Shift-F5 which stops the application immediately. So we need to manually close the processes started with our application.

What is the best way to close the application so that we will not have frustration of closing app during debug stop.

+2  A: 

Are the applications which are launched your own apps? If so, could they detect when their parent process has died, and terminate themselves in that case?

Jon Skeet
I think, that also fine. If the parent app died, the child apps launched by parent must be died/killed
Krish
A: 

How do you shutdown the processes normally?

If you can make a batch file, a separate application or even an AutoHotKey script which just shuts the processes down, then you could put a shortcut to it on the VS toolbar (Tools->External Tools).

I know this is clumsier than having it done automatically, but it's probably better than what you have to do at the moment :D

demoncodemonkey
A: 

Use multiple startup processes to start all three processes under the debugger. Then, when you stop debugging, it will kill all three as well.

As probably now one of the processes starts the other two, you might have to modify it such that you can turn this off for debugging (e.g. via a command-line switch).

oefe