react-scripts-ts + vscode断点

时间:2019-04-14 15:37:51

标签: typescript visual-studio-code vscode-debugger

我想创建一个新的React TypeScript应用程序,并能够在VS Code中使用断点。

create-react-app myapp --scripts-version=react-scripts-ts

Debugging Tests With Create React App using Typescript in VSCode or Chrome似乎建议此配置:

{
    "version": "0.2.0",
    "configurations": [
      {
        "name": "Debug CRA Tests",
        "type": "node",
        "request": "launch",
        "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/react-scripts-ts",
        "runtimeArgs": [
          "--inspect-brk",
          "test"
        ],
        "args": [
          "--runInBand",
          "--no-cache",
          "--env=jsdom"
        ],
        "cwd": "${workspaceRoot}",
        "protocol": "inspector",
        "console": "integratedTerminal",
        "internalConsoleOptions": "neverOpen"
      }
    ]
  }

运行此文件时(在Windows上),我得到提示,询问我要使用什么来打开文件。此时我应该选择什么?

0 个答案:

没有答案