Last active
June 23, 2020 19:34
-
-
Save drobinson/5979612 to your computer and use it in GitHub Desktop.
Xdebug settings for debugging using remote hosts and how to debug cli php scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zend_extension= /usr/lib/php/20170718/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