phpstorm集成xdebug步骤

1.修改apache的httpd.conf文件中的,共两处,修改为php的项目路径,尝试程序能否运行

    DocumentRoot "F:/mobileprojectphp"

    <Directory "F:/mobileprojectphp"></>

2.安装xdebug

    https://xdebug.org/download.php,下载与php版本对应的xdebug版本,可以在custom installation instructions中参照


3.修改apache/bin/php.ini文件和php下的php.ini文件

[xdebug]

zend_extension = "c:/edoc/apache/php/php5.5.12/ext/php_xdebug-2.4.0-5.5-vc11-x86_64.dll"
xdebug.remote_enable = on
xdebug.idekey = PHPSTORM
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = on
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/edoc/apache/tmp"
xdebug.show_local_vars = 0
xdebug.remote_host = 127.0.0.1//下面的connect_back为1的时候host不起作用可以注掉
xdebug.remote_connect_back = 1
xdebug.remote_port = 9000
xdebug.remote_autostart=1
; xdebug.remote_log="c:/xdebug.log"
; xdebug.remote_handler = "dbgp"

; xdebug.remote_mode = "req"

扫描二维码关注公众号,回复: 2189292 查看本文章

4.在phpstorm中配置




5.在chrom浏览器上安装插件

JetBrains IDE Support和Xdebug helper
6.开启项目,打断点调试

注意事项:1.所有的host尽量输为外网或者是局域网地址,不要为127.0.0.1或者是localhost

                2.可以打开 xdebug.remote_log="c:/xdebug.log"进行打印日志进行调试

                3.其实DBGp Proxy可以不设置,插件可以不安装也可以进行调试


猜你喜欢

转载自blog.csdn.net/qingfengmuzhu1993/article/details/80759052
今日推荐