Ben Cherry 4/13/2010

Debugging Closures and Modules

Read Original

This technical article addresses the debugging challenges of using closures for private variables in JavaScript. It introduces the non-standard but widely supported 'debugger' statement, demonstrating how to implement a public .debug() method within modules to pause execution and inspect the closure's scope chain, making private state visible in debuggers like Firebug.

Debugging Closures and Modules

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week