Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Visual Studio Debugger keeps Processes to next session (programatically), how to detach on process exit

$
0
0

I am having a bit of an issue with the Visual Studio 2010 Debugger when attaching child processes through code. Attaching goes fine, but I can't get them detached again.

The scenario runs as follows. - We start a test in debug (System tests written in NUnit) - The tests starts a number of processes, if "Debugger.IsAttached" is true we attach to the child process. (To do so we use the Visual Studio SDK)

Then ending the test can happen in three ways. - The Test completes and the session ends on its own, tear down detaches the debugger. - User aborts testing, test-runner attempts to tear down, tear down detaches the debugger. - User aborts testing and forces the test-runner to shut down, a background process notices this and shots down the tested processes as well as calling detaching all processes.

Now attaching works, we get attached and can debug into the code of the tested processes, but after exit it gets strange.

If we on the next test run decides to run without debug (just run normally) it is like the Debugger remembers the previous state and attaches the processes anyways, so we end up in debugging in any case...

Does anyone have any ideas to what might cause this? and even better, does anyone have an idea of a fix?


Kind Regards
Jens Melgaard
Systems Engineer

Viewing all articles
Browse latest Browse all 4410

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>