views:

39

answers:

1

Hello,

I have a win forms application that I would like to be able to debug during the running of my unit testing and am having a mental block as to how to achieve this. Due to architectural decisions beyond my control, I am unable to re factor this product into manageable components that can be unit tested, so these are technically integration tests being performed in visual studio. That being said, I will try to explain my scenario best that I can.

The win form client (the one I want to debug) connects to various endpoints of an asp.net website using classic wsdl for services. In the VS solution all the various projects are added, Client, Website, and Tests (simplified project list for brevity), During development, the server and client spin-up at one after another by selecting multiple startup projects in the solution properties. Doing this gives me the ability to debug both, and seems like a standard approach to development in VS 2010/2008.

When the time comes to TEST the client (MSTest), I spin-up the server using Microsoft.VisualStudio.WebHost (this gives me the ability to run in-process and to debug). What's missing, and the point of this post is "How do I now start the client in-process with the debugging facilities enabled?". Starting a new process with system.diagnostics does not work, nor does White's Application object (http://white.codeplex.com/)

Any pointer or tips would be much appreciated.

Regards, Stephen

+1  A: 

Instead of launching your executable, launch vsjitdebugger.exe and pass your executable as a parameter. This would launch your app under the registered JIT debugger. On machines with VS installed should be VS itself (provided you actually went in the Options and registered it).

(On machines without VS, I think the registered JIT debugger is Watson, but I might be wrong on this one)

Franci Penov
This does launch the debugger (Thank you) but does not achieve exactly what I'm looking for. First thing, the UI for the debugger is launched which needs to be dismissed after selecting which version of the debugger I want to use, maybe if I provide the full path this will resolve that.Second, I don't want to another instance of the debugger, I want to be able to use the the one that is hosting the integration tests.So sorry for up voting then down voting your response.Stephen
Stephen Patten