console.trace()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
console.trace()
메서드는 웹 콘솔에 스택 추적을 출력합니다.
참고 : 이 기능은 Web Worker에서 사용할 수 있습니다.
구문
js
console.trace([...any, ...data]);
매개변수
...any, ...data
Optional-
스택 추적과 함께 콘솔에 출력할 0개 이상의 객체.
console.log()
메서드에 전달되는 것과 동일한 방식으로 조합되고 형식이 지정됩니다.
예제
js
function foo() {
function bar() {
console.trace();
}
bar();
}
foo();
콘솔에 다음과 같은 추적이 표시됩니다.
bar foo <anonymous>
명세
Specification |
---|
Console # trace |
브라우저 호환성
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
trace() static method |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.