I have a pre-alpha GUI program that I'm dogfooding and want to run under the debugger (for when things go wrong ;)
, but I don't want to have to launch a new copy of Visual Studio for each instance of the application. Can this be done?
I don't expect to actually be debugging more than one instance at a time, but I still want the debugger in the look for all of them. Also, I'm starting the application a few dozen time a day, so it would have to be easy to do.
You can start an instance of the same, or different projects multiple times in one instance of Visual Studio. Here is how: Right click on any project in Solution Explorer, go to the Debug context menu item, and click Start new instance.
You can view and manipulate all your running processes from the Processes window (menu Debug → Windows → Processes). The menu item (and the Processes window) is only available when the application is running (under Visual Studio).
This can be done.
If you have the Professional version of Visual Studio, you can use it to attach to each instance of the application that you have open.
First, compile the application with debug information so that it can actually be debugged.
Then launch your application. Open as many instances as you need.
In Visual Studio, click menu Debug → Attach to Process.... Select the process(es) you want to debug. You can select more than one from the list by Shift + clicking or Ctrl + clicking them.
I've just tested this to make sure. One instance of Visual Studio (at least Visual Studio 2008) can debug multiple instances of the same application.
If you don't have the Professional version I don't think this can be done. I'm absolutely sure the Express version can not attach to processes. I'm not sure about what "paid" editions can attach to processes though it is possible to do.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With