Exceptions in designer - how to find?

Hi,

I have a control added to a form and whenever I open that form it tells me that an exception was thrown in the control and thus it's disabled in the form. However, I can't seem to find where this exception is thrown and everything is fine at runtime. Is there a way to break on exceptions at design time

Thanks,

Tom


Answer this question

Exceptions in designer - how to find?

  • NJCLC

    You may want to use visual studio's debugger to debug your control when hosted in visual studio Smile

    Check out the Debugging section in:
    http://msdn.microsoft.com/msdnmag/issues/03/04/Design-TimeControls/default.aspx


    Best regards,
    Johan Stenberg

  • MattMorg

    well, I found out that I could debug with the immediate window. However, I can't find it Is it not in Visual Studio 2005 Beta 2

  • AnurRS

    Yes, this can happen because the IDE tries to initialise your form in order to render it.  Does the control have any properties that need to be set before it can display properly You may have to shuffle the code around a bit or provide something with a default value so the IDE can initialise your control and call it's paint method successfully.


  • Manidkn

    ahh, looked under View :/
    Thanks

  • TomChung

    The immediate window is included in Visual Studio 2005 beta2. You are most likely to find the command that opens the window in the Debug->Windows menu.

    Best regards,
    Johan Stenberg



  • Exceptions in designer - how to find?