Evgeniy Melnikov
www.angarsky.ru
@angarsky
Settings - Editor - General - Appearance
Settings - Editor - File Types
Settings - Editor - Code style
Settings - Version Control
sudo apt-get update
sudo apt-get install php5-xdebug
Create an .ini file for Xdebug configuration:
Enable Xdebug configurtion and restart your web-server:
sudo php5enmod xdebug
sudo service apache2 restart
Check via terminal:
php - i | grep "xdebug"
Check via PHP code:
xdebug.ini:
zend_extension=xdebug.so
[xdebug]
xdebug.remote_enable = 1
xdebug.remote_connect_back = 1
xdebug.idekey = "PHPSTORM"
xdebug.remote_port = 9000
xdebug.var_display_max_data = 2048
xdebug.var_display_max_depth = 128
xdebug.max_nesting_level = 500
xdebug.ini:
zend_extension = xdebug.so
[xdebug]
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_host = 192.168.56.1
xdebug.idekey = "PHPSTORM"
xdebug.remote_port = 9000
xdebug.var_display_max_data = 2048
xdebug.var_display_max_depth = 128
xdebug.max_nesting_level = 500
If you use the VirtualBox
Configuration in xdebug.ini is not enough for debugging PHP-CLI scripts because Xdebug hasn't information about mapping of local and server files.
Perform a command:
"MyServer" is a Server name with mappings in PhpStorm debugger configuration.
(more information in next slides)
Dynamic IP address?
Your way is port forwarding via SSH tunnel!
ssh -R 9000:localhost:9000 user@host
PuTTY client
xdebug.ini:
zend_extension = xdebug.so
[xdebug]
xdebug.remote_enable = 1
xdebug.remote_host = 127.0.0.1
xdebug.idekey = "PHPSTORM"
xdebug.remote_port = 9000
xdebug.var_display_max_data = 2048
xdebug.var_display_max_depth = 128
xdebug.max_nesting_level = 500
export PHP_IDE_CONFIG="serverName=MyServer"
For PHP-CLI scripts:
Configuring IDE with debugger
Evgeniy Melnikov
www.angarsky.ru
@angarsky