šŸŽ Checkout my Learn React by Making a Game course and get 1 month Free on Skillshare!

Inside the Developer’s Toolbox: Console Trace for JavaScript Debugging

I find myself sometimes using the console.trace() to check from where a method was called. That is when I am too lazy to set breakpoints in the Javascript debugger.

By using console.trace(), we have the get to display the stack trace of every function call leading up to the trace statement. This stack trace is then outputted to the console for examination.

It's great for debugging when we have mutiple posbile paths that can lead to a given function call.

I think it can be useful and made this short video about it.

Enjoy, and please write to me at daniel@js-craft.io if you want a video about a specific JS or CSS subject.

šŸ“– 50 Javascript, React and NextJs Projects

Learn by doing with this FREE ebook! Not sure what to build? Dive in with 50 projects with project briefs and wireframes! Choose from 8 project categories and get started right away.

šŸ“– 50 Javascript, React and NextJs Projects

Learn by doing with this FREE ebook! Not sure what to build? Dive in with 50 projects with project briefs and wireframes! Choose from 8 project categories and get started right away.


Leave a Reply

Your email address will not be published. Required fields are marked *