question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Jest plugin breakpoints doesn't work in Webstorm

See original GitHub issue

Hey,

I’m using the config that @RIP21 proposed in this issue: https://github.com/aelbore/esbuild-jest/issues/24 which is:

module.exports = {
  testEnvironment: 'node',
  transform: {
    '^.+\\.[t|j]s?$': require.resolve('@sucrase/jest-plugin'),
  },
};

(jest.config.js)

And this is simply ignoring all of the breakpoints. I’m using Jest with default configuration created by Webstorm Jest runner.

Versions:

@sucrase/jest-plugin: ^2.1.1
webstorm: 2021.2.1
jest: ^27.3.1 also ^26.6.3 doesn't work
node: 14.17.6
cpu architecture: Apple M1 arm

Also been trying to run it using Visual Studio and this Jest runner: https://marketplace.visualstudio.com/items?itemName=vespa-dev-works.jestRunIt which didn’t worked either.

You can check the minimal example, that I’ve prepared: https://github.com/PatrykMilewski/sucrase-test It doesn’t work with Webstorm, but works a little bit with Visual Studio Code, however breakpoints are shown on the transpiled instead of original code.

I believe I’m missing some sort of Node configuration, because a few months ago it was working, before I’ve moved to a new computer.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
alangpiercecommented, Oct 24, 2021

Hey @PatrykMilewski , I just published @sucrase/jest-plugin@2.2.0, which fixes the issue from my testing. Let me know if you run into any trouble!

0reactions
PatrykMilewskicommented, Oct 25, 2021

Wow @alangpierce it simply works now! You are the best!

Do you accept donations somehow? I would like to send you small donation, as this fix simply saved me quite a lot of work and made my dev stacks a lot better!

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebStorm refusing to stop at many breakpoints while ...
After one year I'm still facing this problem, im running Jest with NestJS and sometimes the breakpoint works, sometimes it doesnt.
Read more >
Test execution does not stop at breakpoint in Intellij jest plugin
I am using jest plugin in intellij. If I use ts-jest and set a breakpoint, while running test in debug mode using Intellij...
Read more >
Troubleshooting - Jest
Tests are Failing and You Don't Know Why​ ... This will run Jest in a Node process that an external debugger can ......
Read more >
Testing and Debugging Happily with WebStorm, Jest and ...
There is nothing more frustrating than trying to run a testing API and getting a super cryptic error, or having your breakpoints ignored....
Read more >
IntelliJ: Stop execution at breakpoint for single file component ...
If I put debugger; in a.vue , it will stop execution at any line. I'm using. Jest Testing Framework; Vue.js ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found