F12 developer tools console API methods
Set named timers to begin and end at different points in your code. Wrap functions, processes, or individual lines of code for precision timing information.
|console.time(name)||Starts a timer. Track timers by using a different name for each as the optional parameter. If you don't specify a name, "default" will be used.|
|console.timeEnd(name)||Ends a timer and sends the result to the console. If you don't specify a name, "default" will be used.|
Use these methods to dig deeper into XML objects and view stack traces.
|console.debug()||An alias for console.log(). Added to improve compatibility with legacy code.|
|console.dirxml(XML node)||Sends an XML node object to the console as an expandable tree.|
|console.trace()||Sends a stack trace to the console from wherever it's called in code.|
The grouping methods organize your console output into groups you can expand or collapse. Groups can be nested within other groups.
|console.group(groupTitle)||Begins a group with the title in the parameter and puts subsequent console messages in it. Groups appear expanded, but can be collapsed. If no title is provided as a parameter, the group is assigned a title of "".|
|console.groupCollapsed(groupTitle)||Begins a group with the title in the parameter and puts subsequent console messages in it. Groups appear collapsed, but can be expanded. If no title is provided as a parameter, the group is assigned a title of "".|
|console.groupEnd()||Closes the most recently opened group.|
This method creates a named counter in the console and increments it each time it's called.
|console.count(title)||Logs a counter to the console the first time it's called with a title parameter. A title's counter is incremented by 1 each time console.count is called with that title. If no title is provided as a parameter, a counter is assigned to a title of "".|