问题
Recently I have upgraded to Jest 23.x.x, using the same VSCode debugging configuration as in Jest 22.x.x, I get weird behaviors: breakpoints are moved, and you cannot really debug (not hitting the real line of code). If I downgrade to 22 everything works as expected.
Is there any breaking change or update from 22 to 23 to be aware of for this case?
My vscode debug launch configuration
{
"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"
},
]
}
来源:https://stackoverflow.com/questions/52454412/visual-studio-code-debugging-jest-breakpoints-not-working-as-expected