question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there a way to hot reloading clear console ?

See original GitHub issue

When the code is hot reload, is there a chrome/firefox plugin or anything to show the seperation from the reload in the console ?

Or add something like console.log("--------------------------------------"); to separate them ?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

20reactions
SpaceK33zcommented, Sep 5, 2016

You could hack into hot reload messages like this:

window.addEventListener('message', function onWebpackMessage (e) {
  // do something
});
17reactions
szalapskicommented, Dec 26, 2018

This seemed to work better for me.

if (module.hot) {
    module.hot.accept() // already had this init code 

    module.hot.addStatusHandler(status => {
        if (status === 'prepare') console.clear()
    })
}

See also https://stackoverflow.com/a/53933757/7453 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there a way to clear the terminal on webpack hot reload?
I want to clear Unix terminal on Webpack hot reloading so that I have a fresh terminal after the reload. webpack · webpack-dev-server....
Read more >
Write and debug code by using Hot Reload - Visual Studio ...
Start the app with the debugger attached using either F5 or, if supported for your application, Ctrl+F5. Open a C#, C++, or Visual...
Read more >
Make a Browser Console Log Wait for a Page Reload
A quick JavaScript how-to guide for making console logs persist after a page reload without using the "preserve log" option in your developer...
Read more >
Using Tomcat reload features to speed up development
Hot reloading is very useful for development, but you should make sure to disable all automatic reloading configurations prior to moving your application...
Read more >
Hot Module Replacement - webpack
Start changing the console.log statement in print.js , and you should see the following output in the browser console (don't worry about that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found