如何使用带有节点的ts-node获取WebStorm - 检查到正确的行?

Jac*_*phy 6 webstorm typescript ts-node

我正在使用TypeScript为Express应用程序供电.

我有nodemon实例化节点与--inspect选项.

  • 我可以连接一个调试会话,并在WebStorm中找到一个断点.
  • 我无法让它达到正确的界限.

这是我的tsconfig.json

{
  "compilerOptions": {
    "target": "es6",
    "lib": ["es2017"],
    "module": "commonjs",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "noResolve": false,
    "noEmitOnError": false,
    "noImplicitAny": true,
    "declaration": true,
    "sourceMap": true,
    "outDir": "dist/",
    "moduleResolution": "node",
    "skipLibCheck": true
  },
  "include": [
    "src/**/*.ts",
    "test/**/*.ts"
  ],
  "exclude": [
    "node_modules"
  ]
}
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

的package.json

"ts-node": "^5.0.1",
"typescript": "^2.7.2"  
Run Code Online (Sandbox Code Playgroud)

为什么WebStorm不会遇到正确的断点并检查req/res?