In case of running/testing window manager on Linux there is Xephyr(1), which creates a brand new display (opened as a new windowed "app") that can be used without breaking the main $DISPLAY that comes with GNOME/KDE/XFCE/i3.
While ago, Julia Evans has published a blogpost about challenge to write own window manager [0]. Perhaps, you will find it interesting if would like to get know more about typical debugging tools for a window manager development.
Very good question! It's been a combination of techniques, but no Docker. I started my initial verification over a SSH/VNC session (e.g. x11vnc) on KISS Linux, which is what i personally run. Lately, I have been hosting various virtual machines and testing on multiple distribution snapshots (i.e. Debian, Arch, etc.)
I switch my process frequently as I move around quite a bit, making development work fairly tedious. I am sure that there is a better way, but this is what I found works for me at the moment.
While ago, Julia Evans has published a blogpost about challenge to write own window manager [0]. Perhaps, you will find it interesting if would like to get know more about typical debugging tools for a window manager development.
[0]: https://jvns.ca/blog/2019/11/25/challenge--make-a-bouncy-win...