Fun fact: the term debug was coined by Admiral Grace Hopper while working on the Mark II computer in the 1940's. A moth became stuck inside the computer and Grace commented that they were debugging the computer as they literally worked to remove the bug. The moth was eventually freed and then the term stuck. You can now find that moth at the Smithsonian Museum.
Back when I was introduced to JavaScript, I used alert dialogs to debug my javascript code. If you're chuckling reading this then you're probably a pro! If not, you should watch my demo where I show you a few different ways to invoke a JavaScript debugger to help you find a bug or resolve a semantic issue in your code.