Outputs a stack trace to the Web Console.
See Stack traces in the console
documentation for details and examples.
console.trace();
function foo() { function bar() { console.trace(); } bar(); } foo();
In the console, the following trace will be displayed:
bar foo <anonymous>
Specification | Status | Comment |
---|---|---|
Console API The definition of 'console.trace()' in that specification. | Living Standard | Initial definition |
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | 10.0 (10.0) | 11 | (Yes) | (Yes) |
Available in workers | (Yes) | (Yes) | 38.0 (38.0) | (Yes) | (Yes) | (Yes) |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | ? | (Yes) | 10.0 (10.0) | ? | ? | ? |
Available in workers | ? | (Yes) | 38.0 (38.0) | ? | ? | ? |
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/console/trace