Arming with Testing and Debugging
Mr. Resig does make a brief mention of the old ways, with the same sentiment, and goes on to mention the basic tools we have for debugging today. All of the major browsers have excellent tools for developers built into them now. Like me, he thanks the developers of Firebug for starting us down this road. They set the bar for the browser makers to reach, and continue to do so.
Debugging essentially breaks into three areas: logging, breakpoints, and inspection.
The book suggests a possible unified logging function to support all browsers (handling the different methods Firefox/Webkit/IE and Opera use, and falling back to actual alerts if needed).
These are consistent in browsers, and good logging tells you where you need to put them. Further, these days you can set conditions on your breakpoints so they’ll only stop when you need them to.
What I Learned In This Chapter:
It’s hard to be in the business this long without picking up the information in this chapter, but I still managed to hear about a testing framework or two I didn’t know about.