Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear console before reload #21

Open
Klustre opened this issue Jul 17, 2024 · 5 comments
Open

Clear console before reload #21

Klustre opened this issue Jul 17, 2024 · 5 comments

Comments

@Klustre
Copy link
Collaborator

Klustre commented Jul 17, 2024

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.

@jardicc
Copy link
Collaborator

jardicc commented Jul 17, 2024

This would be a tool DevTool or UXP responsibility and this checkbox should work.

image

@jardicc
Copy link
Collaborator

jardicc commented Jul 17, 2024

Lol... the checkbox is actually doing something.
image

It prevents console.clear() if enabled.

@Klustre
Copy link
Collaborator Author

Klustre commented Jul 17, 2024

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.

@jardicc
Copy link
Collaborator

jardicc commented Jul 17, 2024

I would rather see change done by UXP team.

@gregbenz
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants