Start a JavaScript debugging session: create a JavaScript run configuration with Chrome as the debugging browser, and click the Debug button on the toolbar.
For details, see Debugging JavaScript.
PhpStorm informs you that it is waiting for connection with the JetBrains IDE Support extension and shows the following message in the Debug tool window:
Click the JetBrains IDE Support extension link which brings you to the Chrome Web Store.

In either case the JetBrains IDE Support page opens.

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

Control over the JetBrains Chrome extension is provided through the chrome://extensions/ page:

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.

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:
http://youtrack.jetbrains.com/rest/*.

Changing port

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 by default.

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:

To fix the problem, specify the actual PhpStorm 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 PhpStorm.

In the IDE Connection area, specify the actual PhpStorm port in the Port spin box.