Posts tagged with debug


php에서 call stack을 출력하기 위해서는 다음을 사용하면 된다. echo (new \Exception)->getTraceAsString(); 예제 <?php function firstFunction() { secondFunction(); } function secondFunction() { thridFunction(); } function thridFunction() { echo (new \Exception)->getTraceAsString(); } firstFunction(); 출력 #0 /Users/…

특정 라인에서 자바스크립트 call stack을 출력하기 위해서 다음을 사용할 수 있다. console.log(new Error().stack); 예제: function firstFunction() { secondFunction(); } function secondFunction() { thridFunction(); } function thridFunction() { console.log(new Error().stack); } firstFunction(); 출력 Error at thridFunction…