Resolve phpstorm + xdebug remote breakpoint debugging

Source: Internet
Author: User
This article provides a detailed analysis of phpstorm + xdebug remote breakpoint debugging. For more information, see XDEBUG configuration:
1. install xdebug. There is a lot of information on the Internet.
Focus on the configuration of php. ini
[XDebug]
The code is as follows:
Zend_extension = "/usr/lib/php5/20090626 + lfs/xdebug. so"
Xdebug. default_enable = On
Xdebug. collect_params = On
Xdebug. remote_connect_back = On // if this is enabled, the following xdebug. remote_host parameters are ignored. <一台webserver有多个开发者的工作目录的时候使用,如:p1.xx.com,p2.xx.com,p3.xx.com 。。。等。>
Xdebug. remote_host = 192.168.59.104 // note that the ip address of the client is <即ide的机器的ip,不是你的web server>
Xdebug. remote_port = 9900 // note that the client port is <即ide的机器的ip,不是你的web server>
Xdebug. remote_enable = On
Xdebug. remote_handler = dbgp
Xdebug. remote_log = "/var/www/xdebug. log"
Xdebug. remote_req = req
Xdebug. auto_trace = Off
Xdebug. remote_autostart = On
Xdebug. show_exception_trace = 0
Xdebug. collect_vars = On
Xdebug. collect_return = On
Xdebug. collect_params = On
Xdebug. var_display_max_depth = 15
Xdebug. show_local_vars = 1
Xdebug. dump_undefined = 1
Xdebug. profiler_enable = 1
Xdebug. profiler_output_dir =/var/www/xdebug

PHPSTORM configuration:
1. file-> setings-> php | right side of Debug. Xdebug. Set the Debug port: 9900 (here, the debug information output by xdebug is transmitted through the local port .)
2. file-> setings-> php | the right side of Servers. Host: The domain name or ip address and port of your web server. the following use path mapping means that the directory of your project corresponds to the directory on the server? Set it here! Otherwise, an error occurs when the file cannot be found and the debugging is terminated.
3. Run-> Edit Configurations-> Add a debugging point for the php web APPlication. On the right side: Select server. starturl you created above to set your portal file.
Now, the configuration is complete!
For such a request, you can register a debugging client!
Http://www.aihuxi.com/?###.php? X debug_session_start = 19192
Click the bug icon to start debugging!

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.