Thanks to Gary Winey (j2associatesNO_SPAM@yahoo.com).
I don't remember where I first saw or stumbled across this technique, but it lets you do Design Time debugging in the same Solution which is a major time saver. I don't know how to do this in C# either.
Follow these steps:
- Set component project as the Active Project
- In the Project Properties Configuration Properties folder, Debugging option
- Set Start Action to Start External Program, Navigate to DevEnv.exe and select it
- Set Start Options Command Line Arguments to Double Quote delimited path to TestProject (eg "c:\MyTest\TestIt.vbproj")
- Save changes
- Run the project - it will open a second Visual Studio session based on the options entered above
- Note that any BreakPoints, etc must be set in the original project, NOT the second Visual Studio project that opens up
Here is a screen shot demonstrating the above:
Unfortunately, I don't remember where I first saw this tip, but it has been a real timesaver. When you are finished debugging in DesignMode, just set another project in the Solution as the active project and you are good to go. All of your settings as noted above are saved and ready to use if you ever change the Component project to be the Active Project again.
Note: That tip only works if the test project is in the same pathing tree as the real project. Recently I ran into a situation where I had to handle two separate paths and finally stumbled upon the proper way to make that work.
Note: See also Bob Powell's tip Debugging Windows Forms Controls.