Javascript Chrome 有内置的调用堆栈吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10761894/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Does Chrome have a built-in Call Stack?
提问by Danny
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?
在 Visual Studio 中,我习惯于在任何断点处显示调用堆栈。Chrome 是否具有调用堆栈功能,我可以在其中查看断点之前的函数?
If not, is there a substitute (3rd party solution that works with Chrome?) that developers use to see what functions led to a breakpoint?
如果没有,是否有替代品(适用于 Chrome 的第 3 方解决方案?)开发人员可以用来查看哪些函数导致断点?
Edit: to be clear, I was expecting the call stack to appear within the javascript console in Chrome.
编辑:明确地说,我希望调用堆栈出现在 Chrome 的 javascript 控制台中。
回答by Niklas B.
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):
我不知道您使用的是哪个版本的 Chrome。我正在使用 Chromium 17,当遇到断点时,Javascript 调试器看起来像这样(强调我的):
回答by Endophage
Open the Developer Tools ("SPANNER" -> Tools -> Developer Tools), select the Scripts tab, on the right there is a section called "Call Stack"
打开开发者工具("SPANNER" -> Tools -> Developer Tools),选择Scripts选项卡,右边有一个叫做"Call Stack"的部分
Enjoy :-D
享受:-D
回答by Arun Pratap Singh
[Version 66.0.3359.139 ]Go to Developer Tools -> Sources -> look on the right side(Call Stack).
[版本 66.0.3359.139]转到开发工具 -> 来源 -> 查看右侧(调用堆栈)。
console.trace()
// To print the call stack.
console.trace()
// 打印调用堆栈。
https://developers.google.com/web/updates/2015/07/print-out-a-quick-stack-trace-from-the-console
https://developers.google.com/web/updates/2015/07/print-out-a-quick-stack-trace-from-the-console