CLion 2018.3 Help

Configuring Browsers

CLion is shipped with a predefined list of most popular browsers that you may like to install and launch automatically from the IDE during running, debugging, or to preview the output of an HTML file. CLion presumes that you install browsers according to a standard procedure and assigns each installation an alias which stands for the default path to the browser's executable file or macOS application. In addition to the browsers from the default list, you can configure custom browser installations.

  1. In the Settings/Preferences dialog (Ctrl+Alt+S), click Web Browsers under Tools. The Web Browsers page that opens shows the browsers from the predefined list and the previously configured custom browser installations, if any. For each browser, CLion shows its name, the family to which it belongs, and the path to the browser's executable file/macOS application or the predefined alias that stands for this path.

  2. To activate a browser, select the checkbox next to its name. The browser will be added to the context menu of the Open in Browse 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 in the Path field points at the right location. If it does not, click browseButton.png and select the actual path in the dialog that opens.

When you select View | Open in Browser, or press Alt+F2, or invoke the browser icons bar, the available browsers are shown in the order in which they are listed on the Web Browsers page. To change the order of browsers in the list, use the icons actions previousOccurence svg and icons actions nextOccurence svg buttons.

To configure a custom browser

  1. In the Settings/Preferences dialog (Ctrl+Alt+S), click Web Browsers under Tools. The Web Browsers page opens.

  2. Click icons general add svg on the toolbar and in the new row specify the browser name, family, and the path to its executable or macOS application.

To use a custom profile

For Firefox and browsers of the Chrome family, you can use a custom profile.

  • On the Web Browsers page, select the browser in question and click icons actions edit svg 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.ini file and choose the profile to use from the drop-down list. Learn more at Firefox browser profile.

    • For Chrome, select the Use custom user data directory checkbox and specify the location of your user data directory in the CLion settings.

    • To launch a browser of the Chrome family with additional options, click icons actions edit svg 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 icons general remove svg on the toolbar. Note that only custom browser can be removed.

Choosing the default CLion browser

When you want to preview your application output in the browser by choosing View | Open in Browser on the main menu or Open in Browser 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 Default Browser.

CLion also opens the CLion default browser to render external resources.

  1. In the Settings/Preferences dialog (Ctrl+Alt+S), click Web Browsers under Tools. The Web Browsers page opens.

  2. 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 icons actions previousOccurence svg and icons actions nextOccurence svg 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 Browse browseButton, if necessary.

  3. 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 checkbox.

    • If the Show browser popup in the editor checkbox is cleared, previewing HTML files is available only through the View | Open in Browser command on the main menu or the Open in Browser command on the context menu of a file.

Last modified: 7 December 2018