Skip to content

Instantly share code, notes, and snippets.

@asjustas
Forked from drobinson/xdebug_settings.ini
Created February 5, 2018 20:26
Show Gist options
  • Save asjustas/bcc1d56f2b5e35ab55f9dde61ee7a142 to your computer and use it in GitHub Desktop.
Save asjustas/bcc1d56f2b5e35ab55f9dde61ee7a142 to your computer and use it in GitHub Desktop.
Xdebug settings for debugging using remote hosts and how to debug cli php scripts
zend_extension = /usr/lib/php5/20121212/xdebug.so
[xdebug]
; This is the default, but just to be sure...
xdebug.remote_port = 9000
; Make sure vmhost is set in /etc/hosts as the ip address of your host machine
; from your virtual machine (set in virtual box as the host-only adapter ip)
xdebug.remote_host = vmhost
; Let xdebug know someone is listening on the configured port and host
; and should try to connect
xdebug.remote_enable = 1
; With remote_autostart disabled you can activate with the -d option
;xdebug.remote_autostart = 1
; Enabling logging will help with debugging debugging problems
;xdebug.remote_log = /tmp/xdebug_log
; Also make sure you specify the name of the server you are using in PHPStorm
; by setting the PHP_IDE_CONFIG environment variable (so PHPStorm knows what path mappings to use for debugging)
; so all together call your script like this:
; PHP_IDE_CONFIG='serverName=<server_name_in_phpstorm>' php -d xdebug.remote_autostart=1 php_script.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment