I need to accept an existing winforms application and go into event tracking mode , with the hope that this is possible.
I would like to see every action that the user takes as a simple thing to track the stack:
MainForm.LaunchThing_Click
ThingWindow.NameInput_Focus
ThingWindow.NameInput_TextChanged
ThingWindow.AddressInput_Focus
ThingWindow.OKButton_Click
etc.
- If it was a WPF application, I would do something like filtering all events like WClientInputMessage in ETW.
- I can’t just reset the stack trace, because it doesn’t capture previous user actions.
- I could add a log for each individual event [with recommended practices from this discussion ], but this is an existing application with too many events. Plus, I'm lazy. Should be the best way.
- I can’t connect the debugger, I want this information to be automatically attached to error reports from testing users in the field, because [it turns out ...] no one can remember exactly what sequence they clicked in.
So I'm wondering if anyone has any good tricks, perhaps using subclasses or reflection to snap into UI events.
Performance is not really a concern. And if I can hook every event, that's good enough; I can easily filter them to the appropriate set.