Muhammed Senussi
Muhammed Senussi
  • Muhammed Senussi
Browser Debugging Beyond console.log
Frontend

The tools shipped in every browser are considerably better than the debugging most of us actually do.

Four that change how you work

  • Conditional breakpoints. Break only when the id matches the one customer whose order is broken, instead of stepping through four hundred iterations.
  • Break on DOM change. When something removes a class and you cannot find what, break on attribute modification and read the stack. This has saved me hours more than once.
  • Local overrides. Edit production JavaScript or CSS in DevTools and have it persist across reloads. You can test a fix against the real environment before writing a line in your editor.
  • Network throttling with a custom profile. Not "Slow 3G", but the latency your actual users have. Most bugs of the "it works on my machine" kind are timing.

The last one is the closest thing to a cheat code for reproducing race conditions, which are otherwise the hardest class of frontend bug to see.

2 Comments

  • Omar Haddad

    June 16, 2026

    Break on attribute modification is the one I did not know about and immediately needed. Thank you.

    • Muhammed Senussi

      Muhammed Senussi

      AuthorJune 16, 2026

      It is buried in the right-click menu on an element in the Elements panel, which is why nobody finds it. Subtree modification is the other useful one when a library is re-rendering something unexpectedly.

Leave a comment