DP_Debug: JavaScript Debugging Extensions
Written by on June 21st, 2007 in Ajax News.
Jim Davis has released a simple little JavaScript dumping library, DP_Debug, that supports circular and recursive references, most system objects and specifies certain otherwise ambiguous conditions. It allows for depth of recursion control, labeling and interactive collapse/expand of results. It’s based in essence on the ColdFusion CFDUMP.
In addition the library allows for simple access to Query String and Cookie values and provides basic logging, code timing support and program integration support (the ability to enable or disable debugging). There’s also built in quick reference documentation.
- dump(): Converts JavaScript objects (their properties, values and relationships) to an HTML representation and displays this in the console for review. It supports objects with circular/recursive references. It’s similar to the insanely useful CFDUMP tag in ColdFusion.
- dumpCookies(): A convenience method which dumps all available browser cookies to the console.
- dumpQueryString(): A convenience method which dumps all available query-string names and values to the console.
- logger(): A method for logging messages to the console using either custom or predefined types. logInfo(), logWarning() and logError() are all shortcut methods for logging specific types of messages easily.
- timer(): A method for timing blocks of code.
- getType(): Provides more advanced Object type-recognition than the native “typeof” operator.
Source: Ajaxian
Original Article: http://feeds.feedburner.com/~r/ajaxian/~3/126764082/dp_debug-javascript-debugging-extensions