Programming/Node.js

Node.js Eclipse Debug

Lawmin 2012. 11. 26. 21:04

1. Node.js + Eclipse

plug-in 설치에서 아래 사이트 추가하여 install

http://www.nodeclipse.org/updates/

-> 설치가 완료되면, Perspective 및 New에 Node 항목이 생기고, New의 Ndoe 항목 하위로 Node Project, Node Soucre File 메뉴가 생김

-> Run, Debug Configuration에 Node Application이 생김


2. Node.js + Eclipse debugging

마찬가지로 아래 사이트 추가하여 install

http://chromedevtools.googlecode.com/svn/update/dev//

-> 설치가 완료되면 debug configuration 에 Standalong V8 VM 이라는 항목이 생김


1, 2번 설치가 끝나면 다음과 같이 debug 가능

1) Debug As로 실행하면 아래와 같이 썰렁하게 뜬다.

debugger listening on port 5858


2)  Debug As 로 다시 아래 Standalone V8 VM 으로 선택후, Port를 5858 로 해주고 Debug 를 누르면


3) Debug Perspective 전환 여부 물으므로 Yes 선택하면, Debug 화면이 나옴

4) 기존 Breakpoint 나 그런건 동일하다!


Troubleshooting

Win7 의 경우 default 실행시 오류가 나오는데,

Window - Preferences - Nodeclipse 에서 node path 를 다시 잡아줘야 한다. (특히 64bit Win7 인 경우 문제가 있는 듯함)