Jump to content
Xtreme .Net Talk

Debugging Custom Controls: How do I set break-points & step through code? (VB)


Recommended Posts

Posted

Debugging Custom Controls: How do I set break-points & step through code?

 

Hello,

 

I have created a custom control that inherits from TextBox. I have created a couple of properties. Then I used this new control in my form. When I try to set the property, I'm getting errors. I want to put a break point & step through the code. I went ahead & put a break-point in my custom control's property's Set where I want to start the debugging, Then I went back to design view of my form & tried to enter a value in the property in question. the code never stopped. I entered a message box where I want to start debugging, and the message does pop up. So I know the code is executing. How do I step through this code & examin value of its local variables?

 

Thanks,

Omid

  • *Gurus*
Posted
Debugging controls at design time is extremely tedious. You have to open a new instance of Visual Studio and attach its debugger to the first instance, which is the one running your control. You can then set the second instance up to break on CLR exceptions (Debug menu -> Exceptions) and when the exception is his in the first one, the second one will break in to source code.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...