Debugging multiple applications

Well, the more complex the application context becomes, the more complex becomes the debugging process.

Since the remote-debugging of .Net 2.0 based applications has been dramatically improved this isn’t any challenge anymore. But there is hope: suppose you have an application, which consists of a console-application which is providing services via WCF and a second application consuming these services. So, how to debug this? Obviously you kneed to debug both apps … but how? Since they have to communicate via WCF (this is the crucial thing!!) this is not as easy as it might seem.

  1. OK, first start your console-app providing the WCF services. Right click on the project and select Debugging\Start New Instance.
  2. Suppose you’re using TestDriven.NET, you just start your main app and choose to test it using the debugger. You should be asked wether you would like to stop the debugging now – this should be answer with no.

Basically that’s all there is to do. But life isn’t always that simple. Because of the multi-threaded (parallel) nature of multiple applications, you might encounter some strange behaviors within Visual Studio …

Leave a Comment.