如何在xampp环境下配置phpstrom xdebug
1、第一步:打开./xampp/php/php.ini文件,搜索xdebug下面的配置仅供参考,路径要换成自己的![xdebu爿讥旌护g]zend_extension = "E:\Deve\xampp\php\ext\php_xdebug.dll"xdebug.profiler_append = 0xdebug.profiler_enable = 1xdebug.profiler_enable_trigger = 0xdebug.profiler_output_dir = "E:\Deve\xampp\tmp"xdebug.profiler_output_name = "cachegrind.out.%t-%s"xdebug.remote_enable = 0xdebug.remote_handler = "dbgp"xdebug.remote_host = "127.0.0.1"xdebug.remote_port = 9000xdebug.idekey = PHPSTORMxdebug.trace_output_dir = "E:\Deve\xampp\tmp"并重启apach后打开浏览器访问localhost查看phpinfo
2、第二步:在phpinfo页面内搜索(ctrl+f)xdebug,如图一,观察是否存在图二红框内容,没有则需要重新配置
3、第三步:设置phpstrom的xdebug配置debug port要和php.ini的 xdebug.remote_port保持一致,默认是9000
4、第四部,在phpstrom内设置xdebug网络应用设置
5、第五步:在设置servers的时候要注意!host(红框)的内容是填写您应用的访问域名。按下apply键完成。
6、第六步:然后在php文件中打下断点,启动右上角绿色的虫子按钮(红色箭头)。在浏览器访问断点程序,便可以进行调试。