You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While debugging in VS Code per the instructions here, I quickly noticed that when stepping through logic, the indicated active line would keep showing as the last one in any given file, which was incorrect. After stepping through it in the browser, I found that all the names were jumbled because of all the Cobertura markup in the source map.
Once I disabled code coverage in the build, debugging worked like a charm again.
To Reproduce
Steps to reproduce the behavior:
Add "'collectCoverage': true," to the jest configuration along with the "html" and "cobertura" reporters and start debugging. Look at the source map (either in VS Code or in your browser) and observe all the markup.
Stepping through the logic in VS Code will jump your view to the last line of the active document after the entry debugging line/breakpoint.
Expected behavior
Ideally, while code coverage requires all this markup in the source maps, the source maps would be generated anew after the code coverage has completed so as to enable a smooth debugging experience.
Link to repl or repo (highly encouraged)
Will follow-up with a repo for this in the next few days.
Jest does generate separate source maps when using coverage as it works by injecting code to count coverage (until #8596 is merged). However, we've seen issues where vs code is too eager. I don't use vs code myself though, so I'm not much help unfortunately
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🐛 Bug Report
While debugging in VS Code per the instructions here, I quickly noticed that when stepping through logic, the indicated active line would keep showing as the last one in any given file, which was incorrect. After stepping through it in the browser, I found that all the names were jumbled because of all the Cobertura markup in the source map.
Once I disabled code coverage in the build, debugging worked like a charm again.
To Reproduce
Steps to reproduce the behavior:
Add "'collectCoverage': true," to the jest configuration along with the "html" and "cobertura" reporters and start debugging. Look at the source map (either in VS Code or in your browser) and observe all the markup.
Stepping through the logic in VS Code will jump your view to the last line of the active document after the entry debugging line/breakpoint.
Expected behavior
Ideally, while code coverage requires all this markup in the source maps, the source maps would be generated anew after the code coverage has completed so as to enable a smooth debugging experience.
Link to repl or repo (highly encouraged)
Will follow-up with a repo for this in the next few days.
Run
npx envinfo --preset jest
Paste the results here:
The text was updated successfully, but these errors were encountered: