reading-notes

Debugging

##Troubleshooting JS What Went Wrong? Troubleshooting JS

  1. a syntax error is a spelling error that causes your code to not work. You may get error messages. Logic errors are harder because its when your code techincally works so theres no “errors” but it doesnt work as intended and gives the wrong result.
  2. I’ve gotten everything I think I couldve. I’ve gotten “blank” not defined, errors from misspelling to putting spaces where I didnt know I wasnt allowed to. Often it required a second set of eyes to determine where I went wrong.
  3. Troubleshooting is a huge compenent to being a good dev. I’ve heard some of my dev friends say they spend much more time troubleshooting than they do writing code.

JS Debugging

The JS Debugger

  1. The debugger is a tool you can use to see not only how, but WHEN your code is breaking.
  2. A breakpoint is where you want the code to stop running while youre testing.
  3. The call stack is the section that shows you all the code that was ran to get to the current line.