VS.代码中的Node.js TypeScriptdebugging
有人可以提供一个VS Codeconfiguration的例子,可以让我:
- 启动Node.jsdebugging器
- 编辑任何TS文件,看到重新编译的项目和debugging器重新启动?
这是支持开箱吗? 可以使用nodemon
吗? 谢谢。
是的,你可以使用nodemon。 在你的launch.json中,如果你触发了智能感知(ctrl + space),你将会看到带有推荐configuration的片段。 有一个nodemon,看起来像这样:
{ "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
- 如何指定我想在Typescript中重载的函数?
- 共享节点js项目和网站项目之间的代码
- 如何捆绑typescript-node-express应用程序
- 如何使用Karma-Webpack使用Node Typescripttypes
- 用于Typings CLI实用程序的命令使typings文件夹与typings.json匹配
- Nodejsstream暂停(非pipe理)和恢复(pipe道)中间pipe道
- 用angular2 observablesasynchronous填充Object属性?
- 在TypeScript中,从`import`和`import require`之间的区别
- Typescript – 有没有办法指定一个全局引用?