Parameters
1 linux SYSTEM:CENTOS6. 5 2 3 vagrant: 2.0. 0455.6. 4 6 7 phpstrom:2017.2
Step 1:
Install the Xdebug extension (installed to skip step 1), first go to xdebug official Download expansion pack
https://xdebug.org/download.php
wget download get tgz compress package, tar unzip
Go to the end of the decompression directory execution Phpinze (make sure PHP extension is installed, not installed self-installing), directory will generate configure directory
Execution./configure--with-php-config=/usr/local/php/bin/php-config (This php-config path is not necessarily the same, determined by itself), after the completion of the make, after the completion of Do Install, no error in the case of extended normal generation
Go to php.ini file add ' zend_extension=xdebug.so ', open xdebug.remote_enable = 1 Xdebug.auto_trace = 1 Xdebug.collect_return = 1 xdebug.profiler_enable = 1 xdebug.remote_port = 9002 related configuration section save exit
Restart the PHP-FPM server to see xdebug information visible phpinfo information
Step 2:
Configuring Phpstrom in vagrant
Open seting-"PHP
Open-"CLI interpreter
Click + On the left to add a configuration item
Save changes, if PHP Strom is not connected to vagrant, create a new deployment, refer to so:https://stackoverflow.com/questions/36328731/phpstorm-can%c2% Useful answer in B4t-connect-to-vagrant-to-add-a-remote-php-interpreter-private-key-n
Return to CLI Interpreters Select deployment Configuration Select the newly created deployment, set general PHP executable as the PHP bin execution path in vagrant
Phpstrom configuration Xdebug Debugging on vagrant