Debugging: Webapps
Things to try when you are stuck
There are many general debugging techniques; this page is devoted to a few that are specific to web applications.
Try these when you are stuck.
Is it a caching problem?
Are you making a change to code (HTML/CSS/JS/Python) but not seeing the effect in your browser?
It could be caching. Try:
- Opening an “incognito” or “private browsing” window and trying the web request again
- Do a hard refresh which could be CTRL-Reload, CTRL-F5, Shift-Reload, or ⌘-Shift-R, depending on your OS, Browser, etc. Learn what works on your particular system.
Use console.log()
statements in JavaScript
In JavaScript, you can use console.log("variable_name" + variable_name)
to write out values of variables to the console. The console
can be accessed from the “Developer Tools” part of your web browser. Various browser have different shortcuts to get there (see the shortcuts for Chrome, Firefox
Safari, and IE