1. Install the Chrome plug-in
In this step, you need to flip the wall, open Chrome, open Web Stroe, search for "jetbrains ide support", and find the following in Extensions:
Install it. After the installation is successful, the extension should appear in the upper right corner of Chrome
JetBranins IDE Support
Icon
2. Create a new project in WebStorm
3. Create a debug configuration item
Click the icon in the upper right corner.
Create a JavaScript Debug
Enter a name and select a URL or a browser. Here, select Chrome for the browser, and then click OK.
4. Start program debugging
Breakpoint
Run the Debug mode
If nothing happens, your Chrome will be automatically opened and a debug prompt will be displayed.
WebStorm has been broken and can be debugged.
The debugging interface has complete functions and is no worse than Chrome's built-in tools. If you want to debug element style, you can only debug it in Chrome.
V. Other instructions
Most projects do not use WebStorm's built-in WebServer to run projects. For example
Tomcat and browser-sync
This type of tool, because the API part needs to access server-end, but it is no problem, if your project is started, the access address is: localhost: 3000, then you need to change the Debug page to the following:
Others remain unchanged. Right-click the JetBrains IDE Support plug-in to open the options. The interface is very simple.
This plug-in can communicate with the IDE. In fact, it is linked to the IDE through a Host and Port, that is, a Debuger Server is automatically started when WebStorm is opened, you can debug the IDE by connecting it to any protocol that complies with it. Open the IDE attributes and search for Debugger. The configuration information is displayed. The default port is
63342
You can modify this port. Generally, you do not need to modify it. For example, if the flying firewall or other programs occupy the port
One of them
The code is as follows: |
Copy code |
Can accept external connections
|
This option is not checked by default. To access the built-in WebServer of IDE on other computers, check this option. Otherwise, only allow
127.0.0.1 or localhost
Access WebServer. Of course, if your program does not rely on the built-in WebServer of IDE, you do not need to select this option.
Finally, you can try it!