Handy JavaScript Debugging Trick
I want to jot this down before I forget how I did it. I haven't cycled through the implications of the following, so use at your own risk.
I'm working on a project where some assets aren't available when I run the web app from my local machine. Sadly, the norm is then that when the app is run from the server, it can't use resources from my machine...or can it?
What I wanted to do was change some JavaScript on the fly. I can access the JavaScript using Firebug in Firefox, but while you can change the variables and the surrounding HTML, CSS, and other DOM parts, it just doesn't seem possible to change the actual text in a function in a JavaScript file.
I gave myself a little face-palm and changed the URL of the <script> tag to point to my localhost, where I was running the app with the changed JavaScript. The browser "refreshed" and re-ran the JavaScript, and my changes were in place! Not terribly efficient, but for small doses it works. While not used by the server or script, the URL has a "query string" like ?version=foo; I can make additional changes to my local script, republish locally, and change the query string in the browser and the new script will reload!
A good-enough blend of both worlds. The browser is using the bulk of its stuff from the server, where all of the images and whatnot are loaded, and I'm able to tweak and test small changes to JavaScript without having to go through a whole redeployment on the server.