Xdebug.ini Configuration For XDebug Version 3: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
(Created page with "placeholder")
 
No edit summary
 
Line 1: Line 1:
placeholder
Settings for XDebug version 3 on the Docker server are specified in `xdebug.ini`. <ref>[https://xdebug.org/docs/all_settings XDebug Settings] -- XDebug Docs</ref>, <ref>[https://xdebug.org/docs/upgrade_guide XDebug Upgrade Guide] -- XDeubg Docs</ref>
 
<pre>
zend.extension="/usr/local/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so"
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.remote_port=9003
xdebug.session="PHPSTORM"
xdebug.remote_enable=1
xdebug.client_host=192.168.123.107
xdebug.remote_log="/tmp/xdebug.log"
</pre>
 
* `zend.extension` is the path to the xdebug library that is installed via `Dockerfile`. If the version of XDebug changes, this path will need to be updated to match the installed library file.
* `xdebug.mode` enables XDebug.
* `xdebug.start_with_request` starts the debugger.
* `xdebug.remote_port` specifies the XDebug port. The default for XDebug version 3 is 9003. This must match the PHPStorm setting under '''Preferences''' > '''PHP''' > '''Debug''' > '''XDebug''' > '''Debug Port'''. (The default port for version 2 was 9000.)
* `xdebug.session` specifies the IDE key used the IDE to connect to XDebug. This matches the ```IDE Key``` setting in PHPStorm's PHP Remote Debug Run Configuration. (`xdebug.session` replaces `xdebug.idekey` for XDebug 2.)
* `xdebug.client_host` specifies the IP of the client running the IDE. (`xdebug.client_host` replaces `xdebug.remote_host` for XDebug 2.)
 
See [[xdebug.ini Configuration For XDebug Version 2|xdebug.ini settings for XDebug version 2]] for legacy settings.

Latest revision as of 16:11, 13 April 2021

Settings for XDebug version 3 on the Docker server are specified in xdebug.ini. [1], [2]

zend.extension="/usr/local/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so"
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.remote_port=9003
xdebug.session="PHPSTORM"
xdebug.remote_enable=1
xdebug.client_host=192.168.123.107
xdebug.remote_log="/tmp/xdebug.log"
  • zend.extension is the path to the xdebug library that is installed via Dockerfile. If the version of XDebug changes, this path will need to be updated to match the installed library file.
  • xdebug.mode enables XDebug.
  • xdebug.start_with_request starts the debugger.
  • xdebug.remote_port specifies the XDebug port. The default for XDebug version 3 is 9003. This must match the PHPStorm setting under Preferences > PHP > Debug > XDebug > Debug Port. (The default port for version 2 was 9000.)
  • xdebug.session specifies the IDE key used the IDE to connect to XDebug. This matches the `IDE Key` setting in PHPStorm's PHP Remote Debug Run Configuration. (xdebug.session replaces xdebug.idekey for XDebug 2.)
  • xdebug.client_host specifies the IP of the client running the IDE. (xdebug.client_host replaces xdebug.remote_host for XDebug 2.)

See xdebug.ini settings for XDebug version 2 for legacy settings.

  1. XDebug Settings -- XDebug Docs
  2. XDebug Upgrade Guide -- XDeubg Docs