Http Spikes
Debugging JavaScript
How would you effectively find out where (and why) an error is occurring in your JavaScript code?
Questions to consider
- What
console
methods are there other thanconsole.log
? Can these help us debug? - What does the
debugger;
statement do? - How do we use the debugger in our browser?
Useful resources
- How to get the most out of the JavaScript console
- Get Started with Debugging JavaScript in Chrome DevTools
Debugging network requests
How can we send and receive test network requests while working on an application?
Questions to consider
- How can we inspect any requests the browser is making on an HTML page?
- How can we manually send test requests outside of our browser?
Useful resources
Debugging HTML & CSS
How can we find out why our page doesn’t look right?
Questions to consider
- How can we see and edit what elements and styles are rendered to the page?
- How can we easily test how responsive our page is?
- How can we debug CSS grid and flexbox layouts?
Useful resources
- Viewing And Changing The DOM in Chrome DevTools
- Firefox Page Inspector
- Simulate Mobile Devices with Device Mode in Chrome DevTools
- A Guide To New And Experimental CSS DevTools In Firefox
Asynchronous JavaScript
How does JS handle asynchronous code?
Questions to consider
- What’s the difference between “synchronous” and “asynchronous” code? Why might synchronous code be called “blocking”?
- What are the event loop and the call stack?
- How do callbacks and promises help us?