Closed Bug 1788271 Opened 4 years ago Closed 3 years ago

Improve Windows Event logging of parameters

Categories

(Core :: Widget: Win32, task)

Unspecified
Windows
task

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: handyman, Assigned: gstoll)

References

Details

(Keywords: good-first-bug, Whiteboard: [lang=c++])

Attachments

(4 files)

The WindowsEvent log records windows messages (e.g. WM_KEYDOWN) sent to our widgets. It writes some important message types by string name. It also writes the wParam and lParam as raw numbers. For at least some of those events, the parameter values are encoded and could be better displayed while for some others the values are useless -- for example, they are pointers to temporary objects (e.g. lParam in WM_WINDOWPOSCHANGING) or bit-fields (e.g. lParam in WM_KEYDOWN). In these cases, we should log the actual useful values for these parameters.

As a bonus, since the messages sometimes use structs in wParam/lParam as output parameters, we might also want to try to log that as well. We might even be able to make the choice of when to log as input vs output vs both, based on the meaning of the specific window message. For example, that struct in the lParam in WM_WINDOWPOSCHANGING is used as both input and output.

We should also add a second log or env var or something, specifically to control whether mouse and repeat events are recorded, since they can spam the log. The current code uses #defines to handle this, so it requires rebuilding to toggle.

Some of this was discussed in bug 1751281.

Whiteboard: [lang=c++]
See Also: → 1793834
Assignee: nobody → gstoll
Pushed by daparks@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/35c8f019bb72 Part 1: log some Windows messages before and after we process them r=handyman https://hg.mozilla.org/integration/autoland/rev/41ed1cd101e2 Part 2: set up utilities to log more info about Windows messages r=handyman https://hg.mozilla.org/integration/autoland/rev/f7ec71342782 Part 2.5: add tests for Window message logging utilities r=handyman https://hg.mozilla.org/integration/autoland/rev/3247add01341 Part 3: richer logging for a bunch of Windows messages r=handyman
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: