HTML DOM console.trace()Method
Examples
Trace the call path of a function:
function myFunction() {
myOtherFunction();
}
function myOtherFunction() {
console.trace();
}
Try it Yourself »
Definition and Usage
The console.trace() method is used to display the call path of the currently executing code in the stack.
Tip:During testing of this method, the console needs to be visible (press F12 in the browser to open the console).
Syntax
console.trace(label)
Browser Support
The numbers in the table indicate the first browser version number that supports this method.
| Method | |||||
|---|---|---|---|---|---|
| console.trace() | Yes | 11 | 10 | 4 | Yes |
Console Object