Search code examples
webstormjetbrains-ide

WebStorm can't find browser when hitting 'Run'


I have occurred an odd issue in WebStorm.

Every time I try to "run" a HTML document I get the error:

Windows cannot find 'browser'. Make sure you've typed the name correctly, then try again. "

Image of error

I don't have Chrome installed and would like to use Edge as my default browser.

Now the odd thing is if I use the little Edge Browser icon to the top right on the HTML page, everything works fine:

image of the badly described icon I am talking about .

Trying to make it work I removed all other browsers from WebStorm, leaving only Edge, but it didn't change a thing (also I have tried all 3 options from the "Default Browser" drop down list:

see image

Edge is set as my default browser in Windows.

I'm eager to hear your ideas on what I have missed! :D


Solution

  • JavaScript debugging can be performed using Chrome and other browsers of the Chrome family only, so opening Chrome when using run/debug configuration is expected.

    This should work for Edge in principle (as new Edge is Chromium-based), fixing WEB-45326 should take care of this. For now, I'd suggest setting up Edge as a new custom browser in Settings | Tools | Web Browsers:

    • press + to add a new browser
    • use Chrome as a Family, specify a full path to browser executable as Path, enter a name

    Browser will be available with Chrome icon in run configuration dropdown

    enter image description here