问题
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.
回答1:
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):
回答2:
Open the Developer Tools ("SPANNER" -> Tools -> Developer Tools), select the Scripts tab, on the right there is a section called "Call Stack"
Enjoy :-D
回答3:
[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
来源:https://stackoverflow.com/questions/10761894/does-chrome-have-a-built-in-call-stack