0

nodeunit の実行時にテストをデバッグしようとしていますが、この SO の質問で説明されていることを試していましたが、試してみると 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はシステム変数にあります。

4

1 に答える 1

0

whichは unix コマンドであり、バッククォート内の「which nodeunit」は、「nodeunit コマンドのパスをここに出力する」ことを意味します。

悲しいことに、ウィンドウではどちらもバッククォートも機能しないため、手動で行う必要があります。

同様のコマンドが where であるため、「where nodeunit」を実行し、出力を書き留めてから rune を実行できます。

node  --debug-brk c:\....\nodeunit test\tests.js
于 2015-09-02T08:37:52.447 に答える