First step: Install the php_xdebug extension and see if the installation is successful
[HTML]View Plaincopyprint?
- sudo apt-get install php5-xdebug #安装命令
sudo apt-get install php5-xdebug #安装命令
[HTML]View Plaincopyprint?
- Php-m # View Commands
Php-m # View Commands
Step Two: Configure the Xdebug extension in php.ini and add the following code to the last line
[HTML]View Plaincopyprint?
- [xdebug]
- xdebug.remote_enable = 1
- xdebug_remote_host = "localhost"
- xdebug.remote_port = 9000
- xdebug.remote_handler = "DBGP"
- zend_extension =/usr/lib/php5/20100525+lfs/xdebug.so
[xdebug]xdebug.remote_enable = 1xdebug_remote_host = "localhost" xdebug.remote_port = 9000xdebug.remote_handler = "DBGP "Zend_extension=/usr/lib/php5/20100525+lfs/xdebug.so
Step Three: Configure XDebug debugging in Eclipse, first menu window->preferences->php->debug->installed debuggers->xdebug double click to fix everything
Fourth step: Set the default debug browser in Eclipse, and follow the red circle to find the appropriate line.
Fifth Step: Install the Easy Xdebug component on Firefox browser
Sixth step: Start setting breakpoints in PHP file, then click the Start Xdebug Session button in the bottom right corner of the browser, jump to eclipse when the page changes, and switch to eclipse for one-step debugging.
Debug interface after a successful configuration
===============================================
Additional Chrome Google browser installs the xdebug extension "Xdebug helper", the specific installation method is as follows:
or access links can also be installed https://www.google.com.hk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved= 0ccsqfjaa&url=%68%74%74%70%73%3a%2f%2f%63%68%72%6f%6d%65%2e%67%6f%6f%67%6c%65%2e%63%6f%6d%2f%77%65%62%73% 74%6f%72%65%2f%64%65%74%61%69%6c%2f%78%64%65%62%75%67%2d%68%65%6c%70%65%72%2f%65%61%64%6e%64%66%6a%70%6c%67%69 %65%6c%64%6a%62%69%67%6a%61%6b%6d%64%67%6b%6d%6f%61%61%61%6f%63&ei=yglcuraygqnoiaea1ycydq&usg= Afqjcnfpnyrntlncivzjerb0bkgnmiwwsw&sig2=4yg_ovsqr839impvinfelq&bvm=bv.58187178,d.agc&cad=rjt
After the installation is complete, you can see in the extension program
Click Tag to use
Ubuntu 13.04 Configure Eclipse's xdebug Debug tool + Firefox's easy Xdebug component combination