VScode下一键调试typescript代码

无须编译typescript文件,直接调试TS代码

launch.json的配置

{
  "version": "0.2.0",
  "configurations": [
      {
          "name": "Current TS File",
          "type": "node",
          "request": "launch",
          "program": "/usr/local/bin/ts-node",
          "args": [
              "${workspaceRoot}/app.ts"
          ],
          "cwd": "${workspaceRoot}",
          "protocol": "inspector"
      }
  ]
}

其中,program为ts-node的安装位置,args为程序的入口文件路径

猜你喜欢

转载自blog.csdn.net/lym152898/article/details/80076283