There are multiple ways to debug Jest tests with Visual Studio Code's built-in debugger. Normally Jest parallelizes test runs across processes but it is hard to debug many processes at the same time. As long as the deployed application has sourcemaps, the breakpoints should be hit. Note: the -runInBand cli option makes sure Jest runs the test in the same process rather than spawning processes for individual tests. To debug a JavaScript application in WebStorm you have to use the JavaScript Debug configuration. When Jest executes the test that contains the debugger statement, execution will pause and you can examine the current scope and call stack. With the updated React Native configuration, WebStorm now supports more run and debug scenarios: you can now separately configure how the bundler is started. I even downloaded a Webstorm chrome plugin but that doesn't seem to do or activate anything either. Click the button that looks like a "play" button in the upper right hand side of the screen to continue execution. Fiddling with other options doesn't work either. In one of my projects, Ive got debug configurations set up. In addition to that, you can also debug unit tests and build scripts. In both editors, you can specify debug configurations to run your apps. With WebStorm, you can debug all kinds of applications written in JavaScript, TypeScript, or Dart: Node.js, React Native and Electron applications and, of course, client-side applications written using different frameworks, such as, Angular, Vue.js, and others. There doesnt seem to be any major advantage in using one editors debugger over the other. The Chrome Developer Tools will be displayed, and a breakpoint will be set at the first line of the Jest CLI script (this is done to give you time to open the developer tools and to prevent Jest from executing before you have time to do so). VSCode and WebStorm both have good debugging of Node.js and React applications with their integrated debuggers.
![webstorm debug react webstorm debug react](https://haseebmajid.dev/6475a8a612fc6c08a75d19b31e6f1901/webstorm.gif)
Click on the address displayed in the terminal (usually something like localhost:9229) after running the above command, and you will be able to debug Jest using Chrome's DevTools. To debug in Google Chrome (or any Chromium-based browser), open your browser and go to chrome://inspect and click on "Open Dedicated DevTools for Node", which will give you a list of available node instances you can connect to.
![webstorm debug react webstorm debug react](http://www.biliyu.com/wp-content/uploads/2017/06/7df09abff8105b86ba7db5ae7130f414.png)
Note that the process will pause until the debugger has connected to it. This will run Jest in a Node process that an external debugger can connect to.