5 JavaScript Debugging Tips To Save Your Sanity

Debugger statement

Seeing a debugger statement in your code (poor-mans breakpoint)

Using the console in the debugger

See all the properties available at this point in time

Conditional breakpoints

When you’ve set a conditional breakpoint the breakpoint turns orange

Async traces

Stepping through the asynchronous call stack

Pause on exceptions

Enable all the pause options (but remember to turn them off when done)
See the exception before it happens




CTO @ OnCare

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
James Broad

James Broad

CTO @ OnCare

More from Medium

What is a JavaScript

Special Concepts about JavaScript & MongoDB

How to understand javascript Closure

JavaScript Design Patterns #2: Open-Closed Principle

An example code snippet written in Javascript keeping the open-closed principle in mind.