Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view/monitor which events are being fired from controls on a user interface

I am creating an GUI using winforms in C#, all the controls have numerous events. I would like to know which of these events are being fired and when. One way would be to put debug statements on each of the event handlers but that would require too much work. Is there any way of doing this in Visual Studio 2008/2010 or are there any tools that can help?

like image 292
Piers Myers Avatar asked Aug 13 '10 14:08

Piers Myers


3 Answers

Managed Spy has possibility to log all events of chosen control. See this article where you can read about this tool and download it.

like image 72
Genrih Avatar answered Oct 20 '22 06:10

Genrih


Runtime Flow (developed by me) with the monitoring filter "Module == System.Windows.Forms.dll && Function == On*" will show what events are firing for all winforms controls.

like image 28
Sergey Vlasov Avatar answered Oct 20 '22 07:10

Sergey Vlasov


If you don't mind some information overload, you could use Spy++ (\Common7\Tools\Spyxx.exe) to see all the windows messages generated by the application.

Some of the window messages translates more or less directly to .net events...

like image 26
Per-Frode Pedersen Avatar answered Oct 20 '22 07:10

Per-Frode Pedersen