The KIRUPA orange logo! A stylized orange made to look like a glass of orange juice!


Debugging JavaScript by Using Breakpoints

by kirupa   |   15 December 2012

No matter how well you write your JavaScript, given its scripty nature, mistakes will happen. The mistakes that you run into will often be subtle. A great time saver when trying to figure out why your JavaScript isn't working is the ability to set breakpoints and step through your code line by line. Firebug makes it very easy for you to do that, and in this video, I show you how.

Hit Play below to get get rolling:

Going Further (or Backwards?)

If you don't want to use breakpoints, you can always fall back to the old methods of using console.log or peppering alert() functions throughout your code.

Got a question or just want to chat? Comment below or drop by our forums (they are actually the same thing!) where a bunch of the friendliest people you'll ever run into will be happy to help you out!

When Kirupa isn’t busy writing about himself in 3rd person, he is practicing social distancing…even on his Twitter, Facebook, and LinkedIn profiles.

Hit Subscribe to get cool tips, tricks, selfies, and more personally hand-delivered to your inbox.


Serving you freshly baked content since 1998!
Killer hosting by (mt) mediatemple

Twitter Youtube Facebook Pinterest Instagram Github