Visual Studio代码调试-Jest断点无法按预期工作

时间:2018-09-22 07:13:35

标签: reactjs debugging visual-studio-code jestjs breakpoints

最近,我已使用与Jest 22.x.x中相同的VSCode调试配置升级到Jest 23.x.x,我得到了奇怪的行为:断点已移动,您不能真正调试(未触及真实的代码行)。如果我降级到22,一切都会按预期进行。

在这种情况下,是否有从22更改为23的重大更改或更新?

我的vscode调试启动配置

{
  "version": "0.2.0",
  "configurations": [    
    {
      "type": "node",
      "request": "launch",
      "name": "Jest All",
      "program": "${workspaceFolder}/node_modules/jest/bin/jest",
      "args": [        
        "--runInBand",
        "--no-cache"        
      ],
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen"
    },
    {
      "type": "node",
      "request": "launch",
      "name": "Jest Current File",
      "program": "${workspaceFolder}/node_modules/jest/bin/jest",
      "args": [
        "${relativeFile}",
        "--runInBand",
        "--no-cache"        
      ],
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen"
    },
  ]
}

0 个答案:

没有答案