2016-12-22 1 views

답변

1

당신은 스택 검사 new Error().stack를 사용할 수 있습니다

console.log(new Error().stack); 

인쇄 :

node debug script.js 

참조 :

당신이 실행할 수있는 노드 디버거가

Error 
    at repl:1:13 
    at sigintHandlersWrap (vm.js:22:35) 
    at sigintHandlersWrap (vm.js:96:12) 
    at ContextifyScript.Script.runInThisContext (vm.js:21:12) 
    at REPLServer.defaultEval (repl.js:313:29) 
    at bound (domain.js:280:14) 
    at REPLServer.runBound [as eval] (domain.js:293:12) 
    at REPLServer.<anonymous> (repl.js:513:10) 
    at emitOne (events.js:101:20) 
    at REPLServer.emit (events.js:188:7) 

이를

그리고 당신은 또한에 모든 라이브 검사를 위해 크롬 개발자 도구를 사용할 수 있습니다

node --inspect script.js 

참조 :

+0

아, 그게 많이 도움이되었습니다. 감사! – Aurieh