Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"create-react-app" debugging not working in WebStorm

I recently updated my web app project to use "create-react-app" rather than a lashed-together Webpack and Babel configuration.

Previously the debugging in WebStorm was working perfectly with the JetBrains Chrome extension.

Now however, when I set a breakpoint in JavaScript (.jsx) files in the project it doesn't stop at the breakpoints. but if I put a breakpoint on a in-line script in the index.html file it works and if I enable " break on exception" it works in that case.

I'm really confused. Any help or suggestions would be fantastic (it's probably something simple).

like image 398
Luke_P Avatar asked Feb 15 '17 09:02

Luke_P


People also ask

How do I use debugger react in WebStorm?

Launch a debugging session Just hold Ctrl+Shift / ⌘⇧ and click the URL address where the application is running. WebStorm launches the auto generated Debug Application run/debug configuration, the browser opens at http://localhost:3000/, and the Debug tool window appears showing you the call stack and variables.

How do I enable debugging in react?

In App Developer MenuOn Android emulator, you need to press command + M. Debug JS Remotely − Used for activating debugging inside browser developer console. Enable Live Reload − Used for enabling live reloading whenever your code is saved. The debugger will open at localhost:8081/debugger-ui.


1 Answers

here is the solution:

update webstorm to "WebStorm-EAP-171.3019.10" :
https://confluence.jetbrains.com/display/WI/WebStorm+EAP

and then follow the configuration here : https://blog.jetbrains.com/webstorm/2017/01/debugging-react-apps/

like image 149
Luke_P Avatar answered Sep 21 '22 06:09

Luke_P