When the trace is enabled, Window Manager and Surface Flinger capture and save current state to a file at each point of interest. frameworks/base/core/proto/android/server/windowmanagertrace.proto and frameworks/native/services/surfaceflinger/layerproto/layerstrace.proto contain the proto definitions for their internal states.
development/tools/winscopeyarn installdevelopment/tools/winscopeyarn run devInternal paths in vendor/ which are not available in AOSP must be replaced by stub files. Actual path can be optionally picked up using env args. For example, to pick up Wayland support, run WAYLAND=yes yarn run dev