I am sorry I did not understand both WebStorm debugger and breakpoint debugging well, this was my first time I do not know how to get stuff together. The Package server is started again after clearing the port. When the Package Server is started it fails as the port 8081 is not available. On clicking Debug option in RUN command in Menu I invariably get the following errors: Make sure Package Server is running. You do not need to define any run/debug configurations yourself, as WebStorm has already created two default ones for you: npm start, to launch your app in development mode. Then I thought that the addon port and debugger port is not associated with webpack-dev-server, only the debug configuration is associated, but these thoughts are all guesses, because I really do not understand.Īt last I run debug, the app index page is opened and it said JetBrains IDE support is debugging, I modified any file and saved it would hot reload, console in WebStorm showed result as in Chrome console, seems all works great, except breakpoints, they are all ignored, like they were not there, in the debugger tool window in WebStorm, the Frames window shows "Frames are not available", the Variables window shows a blue round icon followed by "Connected to JetBrains Chrome Extension" and that is all, none variable shows there. Debugging React-Native in WebStorm Follow. Learn more about Creating a new React application. But WebStorm told me that the port is not free and also the addon on Chrome toolbar now is grey. Then I followed the instructions from here, created a debug configuration with an url of "localhost:8081/build" as there is the webpack-dev-server location.Īt last I tried to set "debugger - built-in-server - port" to 8081, I also installed JetBrains IDE Support addon for Chrome and tried to set the port to 8081 either. Second, Instead of run npm start as the instruction, I also passed this part because I think web-dev-server is already a server, I do not need another one. Though I did not install create-react-app, because my project is not generated by the module, I created project manually with and package.json, I do not know how to generate a existing project. On top of the Debug menu should say 'Debug Android' change this to 'Attach to packager' and press 'Start Debugging' Open another terminal and run. Today I want to debug deeper into the code with debugger in WebStorm, I never use break points before, so I went to this page Go to 'Debug' window (CTRL + SHIFT + D) When prompted for environment choose 'React Native', it should give an launch.json file like this, make sure it contains the following. So, I am using WebStorm to develop an React app with webpack, usually I just run webpack-dev-server in the console, the server is at port 8081 and I open the browser, visit localhost:8081//build and all works with hot reload.
0 Comments
Leave a Reply. |