0
這可能是很簡單的東西,但網上淘了的NodeJS替代Ruby的binding.pry
調試器節點不工作
我有以下testDebugger.js
:
var x = 10;
debugger;
var y = 5;
然後我運行在終端以下:
$ node debug testDebugger.js
我在X形,並得到ReferenceError: x is not defined
繼承人的整個序列:
$ node debug app.js
< Debugger listening on port 5858
debug> . ok
break in app.js:1
> 1 var x = 10;
2 debugger;
3 var y = 5;
debug> x
repl:1
x
^
ReferenceError: x is not defined
什麼想法?真的愛binding.pry
在我的rails應用程序,我討厭被降級到數百萬console.log()
的
你好!感謝刺激,我必須鍵入repl ....但總比沒有好。 –
[node-inspector](https://github.com/node-inspector/node-inspector)可能對您更方便。 –