Custom Controls Design Time Support Part 15: Debugging Design Time

by Amr Elsehemy 12. February 2008 22:16

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).

Prerequisites:

  1. Have a solution containing the control.
  2. Configuration set to Debug.

Steps:

  1. Open that solution containing the control.
  2. Right click the project and select Properties.
  3. Select Debug Tab as in Figure.
  4. From Select Action Group select Start external program then browse the devenv.exe usually found in this path C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exeDebug Tab
  5. Save Settings.
  6. Place breakpoints where ever design time code should be called.
  7. Now Debug the project a new instance of Visual studio will open.
  8. 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).
  9. Choose from the toolbox the control you already built ( Right click toolbox > Choose Items > browse for the dll of the control.)
  10. 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.

Currently rated 4.3 by 9 people

  • Currently 4.333333/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Design Time Support

Comments

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Amr Elsehemy
MCSD C#.Net,
MCTS Sql 2005,
MCPD Enterprise
avatar
E-mail me Send mail

Calendar

<<  August 2008  >>
MoTuWeThFrSaSu
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567

View posts in large calendar

RecentPosts