- Xdebug or Zend Debugger should be installed and configured.
- Install PhpStorm debugger bookmarklets or one of he Browser Debugging Extensions
- Install the Chrome browser extension as outlined in Live Edit in PhpStorm
1. Listen for PHP debug connections
In PhpStorm, toggle the Listen for PHP Debug Connections button in the toolbar. Alternatively use the Run | Start listen for PHP Debug Connections menu.
Depending on preference and/or application requirements we can use PhpStorm's built-in webserver to run our application locally, or make use of any other webserver running locally or on a remote machine.
2.1. (option 1) Using the built-in webserver
2.2. (option 2) Using a different webserver
- Enter the full URL to the page we want to debug on the webserver
- Optionally, provide some mappings so PhpStorm can determine where to find local files relative to the remote URL. This will only be required in complex setups.
3. Start a PHP debugging session from the browser
- Enter the full URL to the page we want to debug on the webserver. Make sure to append the XDEBUG_SESSION_START=some-session-name URL parameter, e.g. ?XDEBUG_SESSION_START=phpstorm
- Listen for PHP debug connections
- Start the newly created Debug configuration