노드 실행 가능 접두어없이 명령 줄에서 직접 실행할 수 있도록 전역으로 설치하려는 NodeJs 모듈 "some-module"이 있습니다. ie : $> some-module [args]
그 중 하나가 --debug
이되고 싶습니다. 이것에 대한 이유는이 모듈의 사용자가 node --debug-brk node_modules/some-module/[path to entry point] [args]
을 실행하기 위해 로컬 디렉토리에 설치하도록 요구하고 싶지 않기 때문입니다. 거기에NodeJs 응용 프로그램을 프로세스 내에서 디버그 모드로 전환
NodeJs 문서 상태는 디버깅 (http://nodemanual.org/latest/nodejs_ref_guide/debugging.node.js.html)
The V8 debugger can be enabled and accessed either by starting Node.js with the
--debug
command-line flag or by signaling an existing Node.js process withSIGUSR1
.
내가 함께이 일을 시도에 고급 용도 섹션의 :
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Unknown signal: SIGUSR1
at EventEmitter.kill (node.js:366:17)
at Object.<anonymous> (c:\dev\some-module\app.js:94:17)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Array.0 (module.js:479:10)
at EventEmitter._tickCallback (node.js:192:40)
: 오류를 발생
process.kill(process.pid, 'SIGUSR1');
실행중인 프로세스를 디버그 모드로 전환하려면 어떻게해야합니까?
또한 node-inspector를 사용하여 주어진 애플리케이션을 디버그하고 싶습니다. 당신은 아마 앱을 설치 할 수