This is final part of my series/tutorial on design time support, it was really fun writing it and hearing your comments and suggestions, I really learnt alot and hope you too had some experience in writing design time support for the custom controls.
In this part, I will show you how to debug the design time code we are writing (works with vs 2005 and 2008).
[more]
Prerequisites:
- Have a solution containing the control.
- Configuration set to Debug.
Steps:
- Open that solution containing the control.
- Right click the project and select Properties.
- Select Debug Tab as in Figure.
- From Select Action Group select Start external program then browse the devenv.exe usually found in this path C:Program FilesMicrosoft Visual Studio 9.0Common7IDEdevenv.exe
- Save Settings.
- Place breakpoints where ever design time code should be called.
- Now Debug the project a new instance of Visual studio will open.
- Start a new project to be a container of the project (new web application to test a web control or a windows application for a windows control).
- Choose from the toolbox the control you already built ( Right click toolbox > Choose Items > browse for the dll of the control.)
- Now drag your control to the testing container and make any design time action (as using smart tag methods), the first instance will stop in breakpoints. Congratulations you are debugging design time code now.
That's the end of the series, but not the end of design time tips and tricks any one comes in my mind, I will be sure to include it in this blog under the category of Design Time Support.
Hope someone out there will benefit from this tutorial, please let me know if you need any help concerning this issue.
Leave a Reply