Language Mechanisms for Debugging - Tips, Tools, and Libraries - Speaking JavaScript (2014)

Speaking JavaScript (2014)

Part IV. Tips, Tools, and Libraries

Chapter 27. Language Mechanisms for Debugging

The following three language constructs help with debugging. They should obviously be complemented by a proper debugger:

§ The debugger statement behaves like a breakpoint and launches the debugger.

§ console.log(x) logs the value x to the console of the JavaScript engine.

§ console.trace() prints a stack trace to the engine’s console.

The console API provides more debugging help and is documented in more detail in The Console API. Exception handling is explained in Chapter 14.





All materials on the site are licensed Creative Commons Attribution-Sharealike 3.0 Unported CC BY-SA 3.0 & GNU Free Documentation License (GFDL)

If you are the copyright holder of any material contained on our site and intend to remove it, please contact our site administrator for approval.

© 2016-2026 All site design rights belong to S.Y.A.