1
node.js에는 파이썬에서 inspect.stack()
및 inspect.currentFrame()
과 비슷한 것이 있습니까? 코드 컨텍스트/프레임 캡처/라이브 개체 검사와 같습니다.node.js의 라이브 객체 검사/스택
node.js에는 파이썬에서 inspect.stack()
및 inspect.currentFrame()
과 비슷한 것이 있습니까? 코드 컨텍스트/프레임 캡처/라이브 개체 검사와 같습니다.node.js의 라이브 객체 검사/스택
당신은 스택 검사 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
참조 :
아, 그게 많이 도움이되었습니다. 감사! – Aurieh