You can configure Xdebug in some PHP editors and IDEs.
- Open
Preferences > Languages & Frameworks > PHP > Debug
and define the settings marked in red as following: - Open
Preferences > Languages & Frameworks > PHP > Debug > DBGp Proxy
and configure it as following: - Open
Preferences > Languages & Frameworks > PHP > Servers
and add a new server clicking on+
and then filling the settings as following: Note: If you use another server name rather thanphp
you must create a.env
withXDEBUG_IDE_SERVERNAME=your-name
. See an example in .env.dist. - Now open
Run > Edit Configurations
and add a new configuration clicking on+
and selectingPHP Remote Debug
. Fill the settings as following: - It's time to start a debugging session 🎉🎉. Whenever you want to start a session, click on
Start Listening for PHP Debug Connections
. To stop, click again. See it in action: