Enable logging Windows messages without changing #defines
Categories
(Core :: Widget: Win32, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox100 | --- | fixed |
People
(Reporter: handyman, Assigned: mvollmer, Mentored)
References
Details
Attachments
(1 file)
It would be great if we could more robustly log Windows messages for debugging. There is existing code that does some mild symbolification of events and logs that to the console. It requires changing some #defines
-- it isn't even built into debug builds without this. This bug is about EVENT_DEBUG_OUTPUT
.
The log provides a lot of value. it collates windows message logging with Firefox logging (unlike Spy++), which is required to get most of the debugging value. it also allows bug reporters to record logs that can be used to track down rare bugs that are only seen on a few machines. Users cannot easily install Spy++ since it requires installing Visual Studio (!)
The current logging code seems to predate bug #s in checkin comments. The closest I've been able to get is here. I assume that the build limitations were based on a desire to keep the binary small by not including the strings, but this shouldn't still be a big deal (is this string table more than a couple of kilobytes?).
The symbolification also does no logging of additional parameters that are message-type-specific. Some of these values, like WM_WINDOWPOSCHANGING
window dimensions or WM_DPICHANGED
numbers would help immensely in debugging things like rare multi-monitor bugs. Putting this message-type to parameter-type association would be best done generically (instead of in each WM_* handler) to limit the spread of the logging code and because most events could be handled essentially identically.
Logging these messages produces a ton of output. If we are to make event logging always available then we should move it to a different log so that the "Widget" log can continue to be used normally. I'd suggest two new logs, since mouse events should be considered separate. They really spam. (Right now, this is controlled by yet another #define
.)
Updated•2 years ago
|
Comment 1•2 years ago
|
||
From what I understand, we basically should have a separate MOZ_LOG target like "WidgetEvents" and "WidgetMouseEvents" and record the above there.
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Reporter | ||
Comment 2•2 years ago
|
||
It would also be cool if we logged our response, aRetValue
.
Assignee | ||
Comment 3•2 years ago
|
||
Updated•2 years ago
|
Pushed by gpascutto@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ca296f209b26 Enable Windows Event logging with separate logging module and message parameters r=cmartin
Comment 5•2 years ago
|
||
bugherder |
Description
•