I use chrome dev tools when needed but also like old school printf debug so I’m working on a template with a Debug component (still in progress).
I add debug messages to an array and render it by writing each element to a <p> tag (in writeBuffer) which is wrapped in a div with class name writebuffer; the css has overflow-y: scroll so I can scroll back and forth as needed. This also means I can copy all messages from the Debug window; I also implemented a simple print as well.
The problem I am trying to solve is that I want the div to auto scroll to the bottom on each render, to get an effect like tail -f so I always see the last output. Note I also want to keep the debug controls (buttons) on the left.