node js 디버깅 inspect

1
node는 V8 의 inspect 를 지원함
https://nodejs.org/ko/docs/guides/debugging-getting-started/


node 에서 inspect를 사용하여 디버깅 하기
  1. node 실행시 --inspect 옵션 추가
    1. node --inspect xxxx.js
    2. Debugger listening on ws://127.0.0.1:9229/04449cf9-af21-492f-b854-78e64fefc26e
      For help, see: https://nodejs.org/en/docs/inspector
      라는 메세지가 추가로 보임
  2. 크롬에서 인스펙터 페이지 방문
    1. url   =   chrome://inspect/
    2. "Open dedicated DevTools for Node" 를 클릭
  3. DevTools - Node.js 라는 페이지가 뜸
    1. 9229 포트로 자동 접속해서 디버깅이 보임
    2. console.log 등의 메세지도 inspect 창에서 보임.
      break point 도 줄 수 있음.
      일반 웹 디버깅과 다른점은 DOM 제어 불가 정도.

Good debug!
댓글
  • No Nickname
    No Comment
  • 권한이 없습니다.
    {{m_row.m_nick}}
    -
제목 작성자 날짜
공대여자
공대여자
mins01
공대여자
공대여자
공대여자
공대여자
공대여자
공대여자
공대여자
공대여자