Using JetBrains Chrome Extension
On this page:
- Installing the JetBrains Chrome extension
- Working with JetBrains Chrome extension
- Overriding the default CORS settings
- Changing port
Installing the JetBrains Chrome extension
Open the JetBrains IDE Support page by doing one of the following:
- Visit the Chrome Web Store at any time.
- Click the Add to Chrome button .
- In the Confirm New Extension dialog box that opens, click Add. The Add to Chrome button changes to Added to Chrome .
When the extension is installed, the icon is displayed next to the Chrome address bar.
Working with JetBrains Chrome extension
- To open the chrome://extensions/ page, click the Customize and control Chrome button next to the address bar, then choose Tools | Extensions on the context menu.
- To deactivate the extension, clear the Enabled check box. The check box name changes to Enable.
- To activate the extension, select the Enable check box.
- To uninstall the extension, click the Remove from Chrome button .
Overriding the default CORS settings
Suppose the page you are debugging requests a resource which is protected against access for security reasons through CORS settings, see https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS. You can enable access to the resources protected by default by changing the Chrome extension options.
To override the default CORS settings:
- Right-click and choose Options on the context menu. A web page with Chrome extension options opens showing the parameters to connect to IntelliJ IDEA.
In the Force CORS text box, type the pattern that defines the URL addresses you want to make accessible, for example:
During a debugging session, the Chrome extension listens to the port of the JetBrains IDE from which the extension was invoked. Each IDE including IntelliJ IDEA has its own default port on which it starts by default.
If for some reason the default IntelliJ IDEA port is already busy, IntelliJ IDEA finds the closest available port and starts on it. This results in a conflict: IntelliJ IDEA is running on a "new" port while the Chrome extension still listens to the port of a previously started product and fails to establish connection with IntelliJ IDEA. The conflict reveals when you initiate a debugging session from IntelliJ IDEA: the extension fails to connect through the default port, IntelliJ IDEA waits for connection from the extension and displays the following message with the port number where it is actually running:
To fix the problem, specify the actual IntelliJ IDEA port in the Chrome extension options:
- Right-click and choose Options on the context menu. A web page with the Chrome extension options opens showing the parameters to connect to IntelliJ IDEA.
- In the IDE Connection area, specify the actual IntelliJ IDEA port in the Port spin box.