Integrating Browser Installations with PhpStorm
To make it possible to launch a Web browser from PhpStorm, you need to integrate installations of Web browsers with PhpStorm, activate or deactivate launching Web browsers from PhpStorm and specify whether a browser will be launched by running its executable file or through the default system command .
PhpStorm is shipped with a predefined list of most popular browsers which you may like to install and use. The items are added to the list in advanced and are not based on the information on actually installed browsers. PhpStorm presumes that you install browsers according to a standard procedure. Based on this assumption, each browser in this predefined list is assigned an alias which stands for the path to its executable file, as PhpStorm supposes it to be. If in your actual browser installation the path to the executable file is different, you need to specify it explicitly as described below.
In addition to the predefined browsers, you can configure as many custom browser installations as you need using the controls on the toolbar. To create a list of Web browser that can be launched from PhpStorm:
- Open Settings / Preferences Dialog by choosing for Windows and Unix or for OS X, and click Web Browsers under Tools.
The Web Browsers page that opens
shows a predefined list of browsers, possibly extended with previously configured custom browser installations.
Each browser is presented as a separate table row.
The fields in each row show the name of the browser, the family to which the browser belongs, and the path to the browser's executable file
or the predefined alias that stands for this path.
To activate an actually installed browser, select the Active check box next to its name.
The browser will be added to the context menu of the menu item
and its icon will be displayed in the Browsers pop-up toolbar.
If the browser was installed according to a standard installation procedure, most likely the alias shown in the Path field points at the right location of the executable file. To specify the path explicitly, click in the Path field and choose the actual location of the executable file in the dialog box that opens.
- To configure a custom browser installation, click on the toolbar. In the new row that is added to list, specify the browser name, family and the path to its executable.
- To change the order of browsers in the list, use the and buttons. The order of browsers in the list affect the order in which they will be shown on the context menu of the menu item.
To specify a custom profile for Firefox or a browser of the Chrome family,
select the browser in question, click on the toolbar.
Depending on the family of the selected browser, the Firefox Settings or Chrome Settings dialog box opens.
For Firefox, specify the path to the required
profiles.inifile and choose the profile to use from the drop-down list. Learn more at Firefox browser profile.
For Chrome, select the Use custom profile directory check box and
specify the location of the
chrome-user-datafolder where users' profiles are stored. Learn more about Chrome profiles at Multi-profiles.
- For Firefox, specify the path to the required
- To launch a browser of the Chrome with additional options, click on the toolbar and type the required keys in the Command Line Options text box of the Chrome Settings dialog box that opens. Learn more about Chrome command line options by opening chrome://flags in Chrome.
- To remove a browser from the list, select the browser and click on the toolbar. Note that only custom browser can be removed.
- To activate an actually installed browser, select the Active check box next to its name. The browser will be added to the context menu of the menu item and its icon will be displayed in the Browsers pop-up toolbar.
Choosing the Default PhpStorm Browser
When you want to preview your application output in the browser by choosing Default Browser. tell PhpStorm which browser you want to be used by default. This browser is called PhpStorm default browser.on the main menu or on the context menu of a file, you need to choose the browser to open the preview in. You can use a specific browser from the context menu or choose
PhpStorm also opens the PhpStorm default browser to render external resources.
- Open Settings / Preferences Dialog by choosing for Windows and Unix or for OS X, and click Web Browsers under Tools. The Web Browsers page opens.
From the Default Browser drop-down list, choose the browser to use by default for previewing pages.
- To use the default operating system browser, choose System default.
- To use the browser on top of the list, choose First listed. Change the order or browsers using the and icons on the toolbar.
- To use another browser as default, choose Custom path and specify the location of the executable file of the required browser. Type the path manually or use the Browse button , if necessary.
Specify the way to have the browsers launched.
- To have a popup window with the enabled browsers appear in the HTML files, select the Show browser popup in the editor check box.
- If the Show browser popup in the editor check box is cleared, previewing HTML files is available only through the command on the main menu or the command on the context menu of a file.