Print out a quick stack trace from the Console

Published on Updated on

Print out a quick stack trace from the Console.

You can use console.trace() to get a quick and easy stack trace to better understand code execution flow.

Notes:

  • You get file names and line numbers which you can click on to navigate to the source.
  • Console.trace is compatible with the snippets feature of Chrome DevTools.
  • console.trace is part of the Console API (just like console.log)

Updated on Improve article

Back

Quickly cycle through the DevTools panels

Next

Who inspects the inspector?

This site uses cookies to deliver and enhance the quality of its services and to analyze traffic. If you agree, cookies are also used to serve advertising and to personalize the content and advertisements that you see. Learn more about our use of cookies.