Gleam Inspect is Gleam's version of the browser's DOM Inspector. It provides a way to answer debugging questions like "why is my line black instead of red?" or "why is my text regular instead of bold?"
To use Gleam Inspect:
-
Run
gleamInspect()
in the devtools console -
Click on a Gleam pane in the application
- Gleam will print a tree of info about the clicked pane
-
Find the painter of interest in the printed info tree
-
Go to the painter's peer in the browser's DOM inspector
-
Edit the painter's CSS props in the browser's CSS editor
-
Trigger a repaint
- Gleam can detect some CSS live-edits, and will repaint automatically
- When Gleam doesn't repaint automatically, trigger a repaint by e.g. clicking anywhere in the Gleam canvas
Call gleamInspect
; click on a pane; find the painter in the printed info tree:
Show the painter in the DOM Inspector; live-edit its CSS: