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

Discussion in 'ASP .Net' started by =?Utf-8?B?amlt?=, Nov 29, 2004.

  1. 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
    =?Utf-8?B?amlt?=, Nov 29, 2004
    #1
    1. Advertising

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

    "jim" <> wrote in message
    news:...
    > 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
    >
    Kevin Spencer, Nov 29, 2004
    #2
    1. Advertising

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

    "Kevin Spencer" wrote:

    > 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.
    >
    > "jim" <> wrote in message
    > news:...
    > > 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
    > >

    >
    >
    >
    =?Utf-8?B?amlt?=, Nov 29, 2004
    #3
  4. 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.

    On 11/29/04 14:39, in article
    , "jim" <>
    wrote:

    > 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
    >
    > "Kevin Spencer" wrote:
    >
    >> 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.
    >>
    >> "jim" <> wrote in message
    >> news:...
    >>> 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
    >>>

    >>
    >>
    >>
    Mikhail Arkhipov (Microsoft), Nov 30, 2004
    #4
  5. 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

    "Mikhail Arkhipov (Microsoft)" wrote:

    > 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.
    >
    > On 11/29/04 14:39, in article
    > , "jim" <>
    > wrote:
    >
    > > 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
    > >
    > > "Kevin Spencer" wrote:
    > >
    > >> 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.
    > >>
    > >> "jim" <> wrote in message
    > >> news:...
    > >>> 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
    > >>>
    > >>
    > >>
    > >>

    >
    >
    >
    =?Utf-8?B?amlt?=, Nov 30, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    715
  2. onyxring
    Replies:
    0
    Views:
    492
    onyxring
    Feb 15, 2006
  3. =?Utf-8?B?U2ltb24=?=

    Custom Control - Design Time Support

    =?Utf-8?B?U2ltb24=?=, Jan 24, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    333
    =?Utf-8?B?U2ltb24=?=
    Jan 24, 2007
  4. MLibby

    Web Custom Control - Design Time Support ? ? ?

    MLibby, Sep 3, 2004, in forum: ASP .Net Building Controls
    Replies:
    4
    Views:
    154
    MLibby
    Sep 4, 2004
  5. Replies:
    9
    Views:
    236
Loading...

Share This Page