HTML DOM console.trace() Method

Definition and Usage

The console.trace() method displays the trace, showing how the code ends at a certain point.

Tip:When testing console methods, make sure the console view is visible (press F12 to view the console).

Example

Show how the trace ends here:

function myFunction() {
  myOtherFunction();
}
function myOtherFunction() {
  console.trace();
}

Try it personally

Syntax

console.trace(label)

Browser Support

The numbers in the table indicate the first browser version that fully supports this method.

Method Chrome IE Firefox Safari Opera
console.trace() Support 11 10 4 Support