I am accustomed to netbeans-xdebug debugging
I am in the Mac this development, everyone Linux configuration Xdebug can also refer to
My PHP is installed through the Mac homebrew, so xdebug installation I also use homebrew (similar to Linux Wget/yum)
Direct entry-operation command steps are as follows:
1 mac Installation Homebrew:ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"
2 configuration PHP.ini
(1) View PHP Version: Php-v (5.3/5.4/5.6/. )
(2) Brew Search Xdebug
Homebrew/php/php53-xdebug Homebrew/php/php54-xdebug Homebrew/php/php55-xdebug Homebrew/php/php56-xdebug
(3) Brew Install Homebrew/php/php55-xdebug (select xdebug that match PHP version)
(4) Locate the xdebug.so file path (/usr/local/cellar/php55-xdebug/2.3.3/xdebug.so)
(5) Find php.ini file (php-i | grep php.ini)
Configuration File (php.ini) Path =>/usr/local/etc/php/5.5
Loaded Configuration File =>/usr/local/etc/php/5.5/php.ini
(6) Modify php.ini add configuration
zend_extension= "/usr/local/cellar/php55-xdebug/2.3.3/xdebug.so"
Xdebug.remote_enable=1
Xdebug.remote_host=localhost
xdebug.remote_port=9000
Xdebug.remote_handler=dbgp
(7) Restart PHP:/usr/sbin/php-fpm restart
3 Configuration Phpstorm
(1) Entering preferences
(2)->build,execution,deployment->deployment-> "+"->add Server, name custom names, type select in place
(3)
4
Click Validate Remote Environment for validate, information show full green/blue without warning, description validate through
5
PHP-> Debug
Right Xdebug configuration
Debug port:9001
Other Items not checked
############ #图片不知怎么回事上传不上去 #########
6
PHP-> Debug-> dbgp Proxy
IDE Key: (Search Xdebug in Phpinfo, view the displayed IDE key, write here)
Host: The address of the debug project
port:9001
7
Run-> Edit configutations
Go to the left point "+" add PHP Web applications,
Right:
Name casually
Configuration
Sever: Select a previously configured PHP Server
Start URL: Debug Project Address (HTTP://XXXX)
Browser: Recommend Chrome (support Phpstorm plugin)
When you're done, add a breakpoint to the index.php and the Run->debug will jump to the breakpoint.
If you want to test a method of a controller, you can add a breakpoint in the method and then debug jump to the browser, then add the requested controller on the URL, method, parameters can jump to the breakpoint;
Thank you ~, hope to help you, if there are deficiencies, forget please forgive me, picture This first pass, really can not be passed up, after a good study.
9
10
Complete ~~~~~~ Reprint Please indicate the source: the author's hard work results