我試着用node-inspector來調試我的節點應用程序。起初,我用「node-debug index.js」和「run node-inspector,then node --debug index.js」有什麼區別?
node-debug index.js
但檢查員debugger
聲明不會停止,還我無法設置斷點。
但是,如果我跑
node-inspector
然後用調試標誌
node --debug index.js
檢查員就像一個魅力運行節點。
那麼這兩者有什麼區別?我嘗試閱讀https://github.com/node-inspector/node-inspector/blob/master/bin/node-debug.js但坦率地不明白:O
非常感謝!
我使用的Mac OSX 10.10.2
我會去查的選項,如果有好的我會反饋在這裏:) – sayen 2015-04-01 03:09:21
我似乎發現泄漏選項,我在node-debug.js中添加了一個'console.log'來打印execArgs,結果execArgs只是'--debug-brk'。所以我嘗試運行'node --debug-brk index.js'附加到檢查器,然後我發現調試器不工作,我無法設置斷點。運行'node --debug index.js'很好。有點奇怪。 :P – sayen 2015-04-01 03:34:32
無論如何都爲他們發佈問題[https://github.com/node-inspector/node-inspector/issues/598](https://github.com/node-inspector/node-inspector/issues/598 ) : 一世 – sayen 2015-04-01 03:50:38