Table of Contents
Javascript 디버깅하기
툴에 종속적이지 않는 방법으로 자바스크립트를 디버깅하는 방법을 설명합니다.
명령어
console.log()
명령을 이용해 크롬의 경우 F12 를 누르면 확인할 수 있는 console 창을 이용해 데이타를 확인해 볼 수 있습니다.
debugger
는 브레이크 포인트와 같이 작동을 멈추도록 합니다.
alert(data);
console.log('normal data: ' + data);
console.log('json data: ' + JSON.stringify(response.data));
debugger;