【问题标题】:vscode error about "--inspect-brk" when I run yarn test every time via vscode debugger当我每次通过 vscode 调试器运行纱线测试时,vscode 关于“--inspect-brk”的错误
【发布时间】:2019-10-11 14:15:02
【问题描述】:

我想在 vsCode 中调试我的单元测试,它被 yarn 毁了:

yarn test path

我的 vsCode 配置:

{
      "type": "node",
      "request": "launch",
      "name": "yarn test",
      "runtimeExecutable": "yarn",
      "runtimeArgs": [
        "test",
      ],
      "args": ["src/apps/trips/components/ChangePayoutModal/__test__/ChangePayoutModal.spec.js"],
      "stopOnEntry": true,
      "console": "integratedTerminal"
    }

但我得到了错误:

$ node scripts/test.js --inspect-brk=31516 src/apps/trips/components/ChangePayoutModal/__test__/ChangePayoutModal.spec.js
● Unrecognized CLI Parameters:

  Following options were not recognized:
  ["inspect-brk", "inspectBrk"]

  CLI Options Documentation:
  https://jestjs.io/docs/en/cli.html

vsCode 添加inspect-brk 选项但不识别?我该怎么办

【问题讨论】:

    标签: debugging visual-studio-code jestjs yarnpkg


    【解决方案1】:

    我猜你可能在这个问题之后遇到了更多问题。我自己还在做这个任务。也就是说,这是您问题的答案。 I found it here. 如果您在配置中添加端口,至少该问题会消失。

          "port": 4079 (for example)
    

    【讨论】:

    • 我今天早些时候确实解决了我的问题,所以如果你有兴趣,我可以写出来。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-12
    • 1970-01-01
    • 2020-07-13
    • 2019-05-01
    • 1970-01-01
    • 2022-07-13
    相关资源
    最近更新 更多