Modern Web Development Workshop
Debugging
Mike Juniper
:: Washington DC R&D Center
mjuniper.github.io/presentations/modern-webdev-debugging
github.com/mjuniper/presentations
TOOLS
Chrome Developer Tools
elements
console
sources
network
Fiddler / Charles
Postman
/
curl
/
JsonView
IE?
dev.windows.com/en-us/microsoft-edge/tools/vms/
+ your VM platform of choice
Techniques
Read the error message (if there is one).
Believe it!
Breakpoints + console.debug(...)
XHR / AJAX
Use the network tab
Did the request go out the door?
Did you get a 200 response?
Did the the response look how you expected?
For more complicated scenarios:
Treat it like science
Come up with a hypothesis.
Imagine ways to test it: If that were true, I should not see the error if I do ...
Test it
Debugging CSS
Was the file loaded (does the rule exist in the browser)? [network tab]
Is the selector right? [elements tab, console]
is it specific enough (is it being overidden)? [elements/styles tab]
outline: solid 2px red !important
When you are stuck
Remember it's not magic, it is comprehensible.
Google & Stackoverflow
Slack
Hands-on