How Do I Debug the Design-Time Support Of My Server Controls?
Follow these steps to enable design-time debugging for your server controls:
- Open up the Property Pages dialog for your project with your server controls. Open the Configuration Properties node and then click Debugging.
- Under Start Action, set Debug Mode to Program and then click Apply. Due to a problem (a bug maybe?) the field for Start Application doesn't update correctly if you don't click Apply. Once you click the Apply button, the field Start Application shows a button with three ellipses at the end. Click that button and then browse to the program devenv.exe, located in your Visual Studio .NET folder (the default location is C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\)
Figure 1: The Property Pages in Visual Studio .NET
- Click OK to dismiss the Property Pages dialog and to apply the settings.
- Set breakpoints in your code at the locations where you want the program to halt. Click in the margin of the code editor, or click F9 to set the breakpoints.
- Start the debugger for your component by pressing F5 or by choosing Debug | Start from the main menu.
- By starting the debugger, you actually start a new instance of Visual Studio .NET that you can attach to. In this new instance, open up an existing ASP.NET Web Application, or create a new one.
- Add your controls to the toolbox. To do this, right-click the toolbox, choose Add/Remote Items..., and browse to the DLL of your Web Control Library project.
- Finally, drag an instance of your control on an ASPX page. If you set a breakpoint in one of your constructors, the code will break immediately. Otherwise, you'll have to change your control (resize, change a property etc) to break into the code.
Where to Next?
Wonder where to go next? You can read existing comments below or you can post a comment yourself on this article.
Links in this Document
Talk Back! Comment on Imar.Spaanjaars.Com
I am interested in what you have to say about this article. Feel free to post any comments, remarks or questions you may have about this article. The Talk Back feature is not meant for technical questions that are not directly related to this article. So, a post like "Hey, can you tell me how I can upload files to a MySQL database in PHP?" is likely to be removed. Also spam and unrealistic job offers will be deleted immediately.
When you post a comment, you have to provide your name and the comment. Your e-mail address is optional and you only need to provide it if you want me to contact you. It will not be displayed along with your comment. I got sick and tired of the comment spam I was receiving, so I have protected this page with a simple calculation exercise. This means that if you want to leave a comment, you'll need to complete the calculation before you hit the Post Comment button.
If you want to object to a comment made by another visitor, be sure to contact me and I'll look into it ASAP. Don't forget to mention the page link, or the Doc ID of the document.
Please correct the following errors:
Unfortunately, something went wrong and your message or comments have not been submitted successfully.
There's a fair chance things broke down because you tried to post something that looks like HTML. Things that look like HTML include (X)HTML, obviously, XML, ASP.NET markup and c# generics syntax as all of them use the < and > characters.
If that's the case, try altering your message and remove anything that looks like an angled bracket. You can replace them with [ and ] for example so you can still make it look like HTML to some extend.
If, on the other hand, you were trying to spam this web site, I am pretty glad I caught you in the act and stopped you from doing so ;-)
Also, please don't use links in your posts; I had to block them to filter out most of the junk mail I am receiving.
The number you entered is not correct. Please enter the sum of the two numbers again.