您的位置首页生活百科

如何在xampp环境下配置phpstrom xdebug

如何在xampp环境下配置phpstrom xdebug

的有关信息介绍如下:

如何在xampp环境下配置phpstrom xdebug

xampp是php在window环境下常用的开发环境组件。学会在xampp环境下的phpstrom xdebug调试,可以更加方便与window环境下php程序的开发效率。那么下面就跟着小编看看如何在xampp环境下配置phpstrom xdebug。

第一步:打开./xampp/php/php.ini文件,搜索xdebug

下面的配置仅供参考,路径要换成自己的!

[xdebug]

zend_extension = "E:\Deve\xampp\php\ext\php_xdebug.dll"

xdebug.profiler_append = 0

xdebug.profiler_enable = 1

xdebug.profiler_enable_trigger = 0

xdebug.profiler_output_dir = "E:\Deve\xampp\tmp"

xdebug.profiler_output_name = "cachegrind.out.%t-%s"

xdebug.remote_enable = 0

xdebug.remote_handler = "dbgp"

xdebug.remote_host = "127.0.0.1"

xdebug.remote_port = 9000

xdebug.idekey = PHPSTORM

xdebug.trace_output_dir = "E:\Deve\xampp\tmp"

并重启apach后打开浏览器访问localhost查看phpinfo

第二步:在phpinfo页面内搜索(ctrl+f)xdebug,如图一,观察是否存在图二红框内容,没有则需要重新配置

第三步:设置phpstrom的xdebug配置

debug port要和php.ini的 xdebug.remote_port保持一致,默认是9000

第四部,在phpstrom内设置xdebug网络应用设置

第五步:在设置servers的时候要注意!host(红框)的内容是填写您应用的访问域名。按下apply键完成。

第六步:然后在php文件中打下断点,启动右上角绿色的虫子按钮(红色箭头)。在浏览器访问断点程序,便可以进行调试。