On this page:
- Installing JetBrains Chrome Extension
- Activating, de-activating, and uninstalling JetBrains Chrome extension
- Overriding the default CORS settings
- Changing the default port for connecting to PhpStorm
Installing JetBrains Chrome Extension
When the extension is installed, the icon is displayed next to the Chrome address bar.
- Open the JetBrains IDE Support page in Chrome Web Store.
- Click the Add to Chrome button , and then click Add in the Confirm New Extension dialog box that opens. The Add to Chrome button changes to Added to Chrome .
To ensure successful debugging, it is enough to specify the built-in web server port and accept the default settings that PhpStorm suggests for other debugger options.
- Open the Debugger page: choose for Windows and Linux or for macOS and click Debugger under Build, Execution, Deployment.
- In the Built-in server area, specify the port where the built-in web server runs so the Chrome extension can connect through it. By default this port is set to the default PhpStorm port
63342through which PhpStorm accepts connections from services. You can set the port number to any other value starting with 1024 and higher.
- Suppress calls to the files on the built-in server from other computers or from outside PhpStorm by clearing the Can accept external connections or Allow unsigned requests check box respectively.
- On the Data Views page under the Debugger node, configure advanced debugger options: enable or disable Inline Debugging, specify when you want to see tooltips with object values and expressions evaluation results, etc.
- On the Stepping page, specify the scripts to be skipped by the debugger.
By default, the debugger does not step only into library scripts. To expand the suppression list, select Do not step into scripts check box and add the URL addresses to skip using the and buttons.
Activating, de-activating, and uninstalling JetBrains Chrome extension
- To open the page, just type
chrome://extensionsin the Chrome address bar.
Alternatively click Customize and control Google Chrome (), choose Settings on the context menu, and then click Extensions on the chrome://settings page that opens.
- 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, for security reasons, protected against access through CORS settings. You can enable access to the protected resources by changing the Chrome extension options.
- Right-click and choose Options on the context menu. A web page with Chrome extension options opens showing the parameters to connect to PhpStorm.
- In the Force CORS text box, type the pattern that defines the URL addresses you want to make accessible, for example:
Changing the default port for connecting to PhpStorm
During a debugging session, the Chrome extension listens to the port of the JetBrains IDE from which the extension was invoked. Each IDE including PhpStorm has its own default port on which it starts.
If for some reason the default PhpStorm port is already busy, PhpStorm finds the closest available port and starts on it. This results in a conflict: PhpStorm 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 PhpStorm.
The conflict reveals when you initiate a debugging session from PhpStorm: the extension fails to connect through the default port, PhpStorm waits for connection from the extension and displays the following message with the port number where it is actually running (for example,
current port 63343):
- Right-click and choose Options on the context menu. A web page with the Chrome extension options opens showing the parameters to connect to PhpStorm.
- In the IDE Connection area, specify the actual PhpStorm port in the Port spin box.