console.trace()を実行するとコンソールにスタックとレースを出力することができます。
1 2 3 4 5 6 7 8 9 10 | function test1() { test2(); } function test2() { console.trace(); } test1(); test2(); |
リンク
Console.trace() – Web API | MDN
https://developer.mozilla.org/ja/docs/Web/API/console/trace