Debugging Closures and Modules
The most common complaint with using closures to keep private variables in JavaScript is that it makes debugging harder. This complaint definitely holds water, and the loss of easy debugging and inspection using the Module Pattern is a serious concern. This is where one of JavaScript's non-standard but well-supported features comes in: the debugger statement. In this article, I'll introduce this statement, and show how I ...