Danny
Danny

Reputation: 3690

Does Chrome have a built-in Call Stack?

From Visual Studio, I'm accustomed to a call stack showing up at any breakpoint. Does Chrome have a call stack feature where I can see what functions preceded my breakpoint?

If not, is there a substitute (3rd party solution that works with Chrome?) that developers use to see what functions led to a breakpoint?

Edit: to be clear, I was expecting the call stack to appear within the javascript console in Chrome.

Upvotes: 46

Views: 46296

Answers (3)

Arun Pratap Singh
Arun Pratap Singh

Reputation: 3656

[Version 66.0.3359.139 ]Go to Developer Tools -> Sources -> look on the right side(Call Stack).

console.trace() // To print the call stack.

https://developers.google.com/web/updates/2015/07/print-out-a-quick-stack-trace-from-the-console

enter image description here

Upvotes: 9

Niklas B.
Niklas B.

Reputation: 95328

I don't know what version of Chrome you're using. I'm using Chromium 17 and the Javascript debugger looks like this when hitting a breakpoint (emphasis mine): Chromium call stack

Upvotes: 49

Endophage
Endophage

Reputation: 21483

Open the Developer Tools ("SPANNER" -> Tools -> Developer Tools), select the Scripts tab, on the right there is a section called "Call Stack"

Enjoy :-D

Upvotes: 8

Related Questions