最近在撸php,书上都不交断点调试,这尼玛坑得很,没有断点的开发程序,就是坑,通过查阅和摸索,调试成功,在此记录下:
php版本:7.1
phpstorm版本:2020.3
首先运行下:
- <?php
- echo phpinfo();
- ?>
然后把他复制,放到:
Xdebug: Support — Tailored Installation Instructions

然后下载后是个dll,可以将其放到ext目录下,到php.in中进行配置:
- [xdebug]
- xdebug.profiler_output_dir="D:\php7.1\xdebug\profiler"
- xdebug.trace_output_dir="D:\php7.1\xdebug\trace"
- zend_extension = "D:\php7.1\ext\php_xdebug-2.9.8-7.1-vc14-x86_64.dll"
- xdebug.profiler_append = 0
- xdebug.profiler_enable = 1
- xdebug.profiler_enable_trigger = 0
- xdebug.remote_enable = 1
- xdebug.remote_handler = "dbgp"
- xdebug.remote_mode = "req"
- xdebug.remote_host= localhost
- xdebug.remote_port = 9000
phpstrom进行配置:

新增一个调试:

构建phpwebpage

配置一个server

配置成这样:

然后再选好路径:

设置断点,然后调试




















