debugger not started and not attached for jest tests on WebStorm 2020.1 Ubuntu Follow
I have default jest config. Which is working on MacOs - when I click debug button - debugger started and attached automatically. And Im able to debug my tests. But for my fresh ubuntu setup it look like not working. Test are runned normally - but in console - no debugger activity. Any ideas?
Please sign in to leave a comment.
What Node.js version do you use? Could you check if debugging Node.js apps work for you?
Node.js v13.13.0. Direct debugging is ok. The thing is that in WS jest test console there is no debug related commands appear for ubuntu. But when I run debug from WS on mac - there are: debugger started on ws socket and debugger attached.
can't reproduce the issue with your project + Node.js 13.13.0 - debugging works as expected...
Could you share a screenshot of the Debugger Console tab with the command line expanded? also, does disabling all custom plugins make things any better?
I get the same thing, only that it doesn't work anywhere, not even ubuntu, mac or windows. The console just before the test says it attached but I have no check-marks on the breakpoints and it just finishes the tests
Here's a youtube link showing the bug. The operating system here is Ubuntu 20.04.1 LTS, the same thing on mac book pro running catalina and windows 10. Also running with jest 26.4.2
PS: I did try to downgrade node version to 13.13.0, still happens.
Must be related to sourcemaps; please share a project the issue can be repeated with
Hello Elena,
Seems that if I make a new project, with create-react-app debugging works. In our project we use react native with typescript. Ill try making a project similar to ours.
Thanks, will keep updating this thread with what I find.
Thank you, looking forward to your feedback!
Hi Elena Pogorelova
I'm facing a similar issue which seems to be all Webstorm related.
Debugging my jest testcases used to work just fine, but now when I start a test in debug mode, it s not showing "Debugger listening... Debugger attached" anymore right after jest --runInBand
I can manage to make it show "Debugger listening" by adding an --inspect node argument option to the run/debug configuration. It's like webstorm is not actually starting node/jest in debug mode.
I cannot be sure unless I downgrade Webstorm, but I believe the only change I made recently in my env was upgrading webstorm to 2020.3.1
I'm using:
Could you please assist ?
Cheers
what Node.js interpreter do you use? Please share a screenshot of your run configuration
Here it is:
I'm using node interpreter under WSL Ubuntu
>I'm using node interpreter under WSL Ubuntu
That's the issue. Please follow https://youtrack.jetbrains.com/issue/WEB-48766 for updates
Thanks Elena Pogorelova ! Any idea about a workaround in the meantime ? This basically keeps us from debugging our code...
no workarounds, except for using a local node interpreter instead of the WSL one...
make sure to set the following in your tsconfig.json:
"sourceMap": true,
"inlineSourceMap": true.
Enabling sourceMap & inlineSourceMap in tsconfig.json solves it for me - as suggested by Fabian Sellemond , Elena Pogorelova
I use a separate TS config for test, and pass that to jest.config.js , eg: