Preserve console logs
Debugging code in javascript might be tricky sometimes. Especially when we want to log into console events that triggers page reload. But we can preserve logs. For example in Chrome we go into console -> console settings (this lower one button) -> preserve log

Chrome dev tools will show all logs and only inform us by logging info that it changed page.