English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML DOM console.trace() Method

 JavaScript Console Object

console.trace()The method outputs the stack trace to the console, which shows how the code ends at a certain point.

Syntax:

console.trace()
function foo() {
   bar();
}
function bar() {
   console.trace();
}
foo();
Test and see‹/›

Browser Compatibility

All browsers fully support the console.trace() method:

Method
console.trace()YesYesYesYesYes

 JavaScript Console Object