buy the book to support the author.
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 valuex
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.
当前内容版权归 speakingjs.com 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 speakingjs.com .