views:

49

answers:

1

I am currently troubleshooting a large and unwieldy GUI-based tool in Visual Studio, and was wondering whether there is any way to get some kind of notification (either by writing to the console or through a third-party tool) whenever any handled event occurs. This would make it a lot easier to track down what precisely is going on while I am interacting with this beast. Is there an 'on any event being handled' event I can handle, or some kind of add-in for VS which would make this possible?

+2  A: 

Short answer I'd say no, certainly not that I'm aware of.

Long answer, maybe try postsharp, add an OnMethodBoundaryAspect. It's going to give you alot more info that simply 'whenever an event gets handled' but it will give you a very clear picture the path(s) of execution.

So whenever an event is handled a method will be called, you will be able to see that method in the output from postsharp, problem is it will be buried amongst alot of other trace info.

It is also possible that postsharp has a mechanism that does exactly what you want, I'm not aware of it but you could ask on the forum, they are usually very good/quick at responding.

wallismark