UBUNTN Configuring Xdebug Debugging in the Nginx+phpstorm

Source: Internet
Author: User

Xdebug installation and configuration instructions, primarily for individual learning RECORDS.

first, Echo Phpinfo (); Search xdebug, If not found, the identity is not installed or failed to Install.

second, Copy all the results from step 1. To access the http://xdebug.org/wizard.php, paste the copied information into the text box and click the Output Button.

three, Step 2 After the operation, the output of the output according to the completion of Xdebug Installation.

1, Download xdebug, visit Https://xdebug.org/files/will list all Xdebug versions, Select as needed, I have chosen here: xdebug-2.5.0.tgz (specific visit: https://xdebug.org/ Files/xdebug-2.5.0.tgz).

2, decompression, Tar-xvzf xdebug-2.5.0.tgz

3. Go to folder: CD xdebug-2.5.0

4, in the terminal input phpize, to see if the output information,

Configuring For: ...

Zend Module Api no:20131226

Zend Extension Api no:220131226

5, Execute the Script:./configure

6. Execution: Make

7. Copy the installed xdebug.so file to the PHP extension directory: CP modules/xdebug.so/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/

8, Modify php.ini, Add extension, php.ini general will be in/usr/local/php/etc/php.ini; in php.ini add:

Zend_extension =/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so
Xdebug.remote_enable=1;//allow the remote terminal to be marked open here
Xdebug.remote_handler=dbgp
Xdebug.remote_mode=req
Xdebug.remote_host=localhost
xdebug.remote_port=9000
Xdebug.idekey= "phpstorm";//this is the debugger keyword in chrome and Firefox plug-in configuration to use

9. Restart Nginx service: nginx-s Reload

10, Restart PHP-FPM service, first view php-fpm:ps-ef |grep php-fpm. Restart main process: KILL-USR2 1993.

10.1: reference: Http://www.cnblogs.com/GaZeon/p/5421906.html. PHP-FPM extensions:

INT, term immediately terminates

QUIT Smooth Termination

      USR1 Reopen log file

      USR2 smoothly overloads all worker processes and reloads the configuration and binary modules

11. Repeat step 1 to see if the Xdebug is installed Successfully.

12. Open phpstorm, Set the basic configuration:

12.1. [file]->[settings]->[servers]: Click the Blue plus sign (+) and fill in the name\host: localhost

12.2,[FILE]->[SETTINGS]->[DEBUG]->[DBGP Proxy]: in the IDE key\host\post filled in: phpstorm\ localhost\9000

12.3, [run]->[edit configurations]:name Input localhost; Server Select 12.1 to add localhost; Start URL input http://localhost, Browser Select default or other

12.4, Click on the phpstorm right to enlarge the blue button, respectively, represents: run\debug run\ Monitoring

The above steps can be completed Phpstorm under the Xdebug configuration Debugging. If you want to access the Web page in the browser, you can debug, you need to always turn on listening [Start Listening for PHP]

UBUNTN Configuring Xdebug Debugging in the Nginx+phpstorm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.