Reputation: 3690
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
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
Upvotes: 9
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):
Upvotes: 49
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