Show how the code ended up here:
function myFunction() {
myOtherFunction();
}
function myOtherFunction() {
console.trace();
}
Try it Yourself »
The trace()
method displays a trace that show how the code ended up at a certain point.
When testing console methods, be sure to have the console view visible.
Press F12 to open the console veiw.
console.trace(
label)
Parameter | Description |
label | Optional. A label to give the timer a name. |
console.trace()
is supported in all modern browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | 11 |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!