Chrome Dev Tools: Sources Tab
Info and mini-lesson on the 'Sources' tab of Chrome Dev Tools. Check out more in-depth documentation here: https://developers.google.com/web/tools/javascript/breakpoints/
The 'Sources' tab is most useful for debugging JavaScript. The bigger your project is, the harder it can be to find exactly where a problem occurs.
You can select different parts of the code to be 'breakpoints', checkpoints that will stop the code at that exact moment.
There are different breakpoints you can watch for, like for a specific line of code, on a DOM event, a server request called XMLHTTP request, or a javascript event.
When you set a breakpoint, the browser pauses everything when it interprets that line of code or event.
By slowing everything down and giving yourself a chance to examine what's happening at every spot you've set, you can keep track of exactly what's happening in the page or app.
Once all of the breakpoints are set, you can step through the code and examine the state of your page or app at every breakpoint.
Just like with elements, you can live-edit through dev tools, but remember to save those changes however you can so your progress isn't lost.
Other Videos By freeCodeCamp.org
2015-09-20 | The DOM: What's the Document Object Model? |
2015-09-20 | Big O Notation: A Few Examples |
2015-09-20 | The DOM: Style in the Header, Script in the Footer |
2015-09-20 | Big O Notation: What It Is and Why You Should Care |
2015-08-24 | Chrome Dev Tools: Summary Tab |
2015-08-24 | Chrome Dev Tools: Console Tab |
2015-08-24 | Chrome Dev Tools: Audits Tab |
2015-08-24 | Chrome Dev Tools: Resources Tab |
2015-08-24 | Chrome Dev Tools: Memory Tab |
2015-08-24 | Chrome Dev Tools: Timeline Tab |
2015-08-24 | Chrome Dev Tools: Sources Tab |
2015-08-24 | Chrome Dev Tools: Network Tab |
2015-08-24 | Chrome Dev Tools: Elements Tab |
2015-08-23 | JavaScript Lingo: Regular Expressions |
2015-08-23 | JavaScript Lingo: Loops |
2015-08-23 | JavaScript Lingo: Math |
2015-08-23 | JavaScript Lingo: Manipulating Data |
2015-08-23 | JavaScript Lingo: Finding and Indexing Data in Arrays |
2015-08-23 | |
2015-08-23 | JavaScript Lingo: Variables & camelCase |
2015-08-23 | JavaScript Lingo: Value Types |