user736893
user736893

Reputation:

WebStorm debug using localhost after adding deployment config?

By default in WebStorm if you hit "Run" or use the browser hover selection, it will launch the html file using http://localhost:????. I have added a test webserver http://test.mydomain.com to the deployment configs.

How can I now debug locally again?

Upvotes: 0

Views: 56

Answers (1)

lena
lena

Reputation: 93738

Would you like to have your pages hosted on http://localhost:63342 by default despite having http://test.mydomain.com set up as a deployment server?

When you are using Open in browser action, or preview a file in browser using browsers bar in editor, or create a new Run/Debug configuration from .html file right-click menu, WebStorm uses URL from current Deployment entry (which is marked as Default) to build full URL. If you have no deployment entries defined, then built-in web server (http://localhost:63342) is used.

There is a feature request to optionally use built-in webserver for previewing files in browser regardless of deployment settings, WEB-18958.

For now, I can suggest the following workarounds:

  1. Make your deployment entry non-default (right-click, Stop using as default) Note that it will break auto-deployment (if you have it set up)

enter image description here

  1. or, use Run configuration with the built-in server URL for running your application. But, as run configurations created from right-click menu always have the default server URL pre-configured, you need to edit created configurations in Run | Edit configurations... dialog, making sure that the built-in sderver URL is specified there instead of your deployment server URL.

Upvotes: 1

Related Questions