Log SVG to debug window when setting state, and support clearing state.