views:

38

answers:

1

I have a very strange bug, which I believe is caused by some code we have executing, but I'm not sure where.

We can reproduce it to the point it happens whenever we click Tab, but short of putting a break point at the beginning of every method in the project to find out what is executing.

Is there a way to set visual studio to break whenever anything executes?

For those curious about the problem, every now and then, we have a few Rich Text Boxes that refuse to lose focus. You can't click out of it or tab out of it.

We have no On Validation or On Text Changed events attached to the control, and believe it's an event attached somewhere else to something we just aren't noticing.

+2  A: 

You can set a breakpoint in the WndProc method, which will run whenever Tab is pressed.

SLaks
How do I attach to that, would I need to add a method to it?
Aequitarum Custos
Debug, New Breakpoint, Break at Function, `System.Windows.Forms.Control.WndProc`.
SLaks