Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open/debug current file using built-in Web server in WebStorm?

Is there a way to create a run configuration that will open the file that is being edited in the browser using the WebStorm built-in web server (http://localhost:63342/) and start the debugging?

reference: http://blog.jetbrains.com/webstorm/2013/03/built-in-server-in-webstorm-6/

like image 210
Sylvain Avatar asked Dec 15 '22 11:12

Sylvain


1 Answers

You don't need a run configuration, but a default In place deployment:

server

Note that the server configuration name (LOCAL) is in bold which means that it's the default (can be set from the right click menu or an icon).

Configure Mappings like this:

mappings

where project is the name of your project.

Now you can use View | Preview file in (Alt+F2) and enable Live Edit if needed.


Note that it's useful for the preview and will not start JavaScript debugging. To debug the scripts on a page right click in the file and use the Debug action in the Run or file context menu, or the corresponding keyboard shortcut:

Debug

like image 55
CrazyCoder Avatar answered Dec 21 '22 23:12

CrazyCoder