How to Debug Design-Time support of ASP.NET Control

G

Guest

I am trying to debug a user written web control and web control designer. I
found an article “Building Windows Forms Controls and Component with Rich
Design-Time Features†that describes how to setup debugging for a Windows
Form control. I cannot find any documentation or articles on setting up the
same facility for a Web control.

Any help on setting the control library project to debug the design-time
code would be greatly appreciated.

Jim
 
K

Kevin Spencer

Unless the Control was compiled with debugging symbols, you're SOL.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
G

Guest

Sorry I left out that the project consist of a test web page and the control
library. Both are being built with the debugger. I am trying to debug the
design-time code of the control while Visual Studio 2003 is in the web page
designer of the test web page.

Jim
 
M

Mikhail Arkhipov (Microsoft)

You need to run another instance of Visual Studio and use it to debug first
instance of VS that loads and instantiates the control.

1. Create a project for the Web control. Set executable to run to
devenv.exe.
2. Build the control library.
3. Set breakpoint in the control constructor.
4. F5. Ignore warning that devenv.exe has no symbols.
5. In the new instance of VS open/create a Web app project.
6. New Web form, add your control to the page.

At this point BP in the control constructor should get hit.

Thanks
Mikhail Arkhipov (Microsoft)
-- This post is provided 'AS IS' with no warranties and confers no rights.
 
G

Guest

Mikhail,

Ok, here is the scoop. I could not set the Start Application property
because it was disabled even though the Debug Mode was set to “Programâ€.
Now the reason for this follows.

The Web Control Library’s default Debug Mode is set to “Projectâ€. The other
properties states in the Start Action branch are initially set as:
· Start Application – (Disabled)
· Start URL – (Disabled)
· Start Page – (Enabled)

Changing the Debug Mode ComboBox to “Program†does not change the state of
the other properties in the Start Action branch. Therefore I could not set
the ‘Start Applicationâ€.

Now one very important step was missing from all the instructions. It seems
you need to click the “Apply†button after changing the Debug Mode ComboBox
selection. Being a person who never clicks the “Apply†button until all his
changes are made (just incase I want to cancel) caused the problem.

To me there seems to be a problem in Visual Studio’s Debug Mode ComboBox;
the SelectedIndexChanged event is not programmed to change the enable state
of the Start Application, Start URL, or Start Page properties when the
appropriate entry is selected. Having to click the “Apply†button is not
always obvious!

So for fellow I’ll click a button when I am done please update the
instructions, fix the ComboBox event, or make it obvious.


Regards,

Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top