2017-02-07 10 views
2

誰かが私を許すVSコードの構成の例を提供することができます。プロジェクトは再コンパイルを参照してくださいNode.jsの活字体のデバッグ

  • スタートNode.jsのデバッガ
  • 編集任意のTSファイルをとデバッガが再起動しましたか?

これは、サポートされていますか? nodemonはなんとか使用できますか?ありがとう。

+0

これは役立つかもしれない:https://code.visualstudio.com/Docs/editor/tasks #_background-watching-tasks –

答えて

1

はい、nodemonを使用できます。 launch.jsonでは、intellisense(ctrl + space)をトリガーすると、提案された起動設定を含むスニペットが表示されます。このようになりますnodemonのための1があります:

{ 
    "type": "node", 
    "request": "launch", 
    "name": "nodemon", 
    "runtimeExecutable": "nodemon", 
    "runtimeArgs": [ 
     "--debug=5858" 
    ], 
    "program": "${workspaceRoot}/app.js", 
    "restart": true, 
    "port": 5858, 
    "console": "integratedTerminal", 
    "internalConsoleOptions": "neverOpen" 
} 

ドキュメントは、それがどのように動作するかの説明があります https://code.visualstudio.com/docs/editor/node-debugging#_restaring-debug-sessions-automatically-when-source-is-edited