How to configure PHP, Xdebug, Docker and PHPStorm

Updated: 15 November 2023

1. Select these two items in PHPStorm:
Run > Start Listening for PHP Debug Connections
Run > Break at first line in PHP scripts

2. Load a page in a web browser.

3. PHPStorm should display an Incoming Connection From Xdebug dialog box.

4. From the bottom of the dialog, select the local file which matches the ‘File path on server’ value and click Accept.

Leave a comment