vscode调试typescript

1、记录一个插件:https://www.npmjs.com/package/ts-node

# Locally in your project 
npm install -D ts-node
npm install -D typescript
 
# Or globally (not recommended) 
npm install -g ts-node
npm install -g typescript
 
lanch.json
{
    "type": "node",
    "request": "launch",
    "name": "Launch Program",
    "runtimeArgs": [
        "-r",
        "ts-node/register"
    ],
    "args": [
        "${workspaceFolder}/index.ts"
    ]
}

 

posted on 2018-12-20 16:17  杨龙飞  阅读(507)  评论(0编辑  收藏  举报

导航

Fork me on GitHub