Javascript 堆栈跟踪为空
Javascript stack traces come up empty
Firefox 控制台中显示的堆栈跟踪始终为空。我是不是遗漏了什么或者这可能是 Firefox 的错误?
示例 JS:
function foo() {
bar()
}
function bar() {
console.trace()
}
foo()
结果输出:
(Ubuntu 使用 FF 59)
这可能是 Firefox 59.0.2 中的一个错误,已在 Firefox Nightly 61.0a1 (2018-04-23) 中修复。
话虽如此,您只需要确定执行代码的位置即可。当您在 Scratchpad 中执行代码并检查 Browser Console, it might not work as expected. Though when you check the Web Console 中的结果时,堆栈跟踪显示正确。
或者,也有可能run your code within the browser context得到预期的结果。
Firefox 控制台中显示的堆栈跟踪始终为空。我是不是遗漏了什么或者这可能是 Firefox 的错误?
示例 JS:
function foo() {
bar()
}
function bar() {
console.trace()
}
foo()
结果输出:
(Ubuntu 使用 FF 59)
这可能是 Firefox 59.0.2 中的一个错误,已在 Firefox Nightly 61.0a1 (2018-04-23) 中修复。
话虽如此,您只需要确定执行代码的位置即可。当您在 Scratchpad 中执行代码并检查 Browser Console, it might not work as expected. Though when you check the Web Console 中的结果时,堆栈跟踪显示正确。
或者,也有可能run your code within the browser context得到预期的结果。