My Go-To Quick Debugging Trick: Freezing the Page with setTimeout and debugger
As a web developer, one of the trickiest things to debug is elements like dropdowns, menus, or lists that tend to disappear or change state when you unfocus or interact with other parts of the page. My favorite and super quick trick to tackle this is using setTimeout(() => { debugger; }, 5000).
Here's why it's so effective: