我正在尝试在运行nodeunit时调试测试并尝试在this SO Question中解释的内容,但在尝试时它在Windows中不起作用。
d:\code\path>node --debug-brk `which nodeunit` test\tests.js
Debugger listening on port 5858
module.js:338
throw err;
^
Error: Cannot find module 'd:\code\path\`which'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.runMain [as _onTimeout] (module.js:501:10)
at Timer.listOnTimeout (timers.js:110:15)
我在Windows中尝试这个,而node_path在System变量中。
答案 0 :(得分:0)
which
是一个unix命令,反引号中的`which nodeunit`表示:'在这里打印nodeunit命令的路径'
可悲的是,在窗户上既不会起作用也不会起作用,所以你必须手工完成。
类似的命令在哪里,所以你可以运行' where nodeunit',注意输出然后符文
node --debug-brk c:\....\nodeunit test\tests.js