Open Klustre opened 1 month ago
This would be a tool DevTool or UXP responsibility and this checkbox should work.
Lol... the checkbox is actually doing something.
It prevents console.clear() if enabled.
Can confirm that works. In that case it would be nice if Bolt clears the console and users can toggle 'Preserve log' to keep it.
I would rather see change done by UXP team.
I have a console.clear() early in my code (after loading shims), and it works great. If you need to see something, you can enable that option in the debugger to preserve logs (ignore clear commands). Or just cmd-K or L to clear.
Currently the UXP debug console history is kept after hot reloading, but I find myself clearing it manually after each reload to get a clean slate. Any logged objects lose their reference, so I don't think there's any reason to keep the history.