![Umar Hansa](https://web.dev/images/authors/umarhansa.jpg) Umar Hansa [X](https://twitter.com/umaar) [Homepage](https://umaar.com/)

<br />

![Print out a quick stack trace from the Console.](https://developer.chrome.com/static/blog/print-out-a-quick-stack-trace-from-the-console/image/print-a-quick-stack-trac-3af95c5257a46.gif)

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`)