我的安装环境:XAMPP版本号V3.1.0 ;phpStorm版本8.0.3;windowsxp 32bit。您老人家先过目一下,不然怕影响意义。
XAMPP、phpStorm 都直接安装在了D盘根目录,9999m目录建在D:\xampp\htocts下,即目录工程文件夹路径为D:\xampp\htocts\9999m。在phpStorm>File>open,找到9999m,点击确定,加载9999m到了phpStorm(安装环境路径根据需要自行更改,后面的配置内容也类似)
1. 开始服务器端配置:安装好XAMPP,停止apache服务(注意,如果直接退出XAMPP,是不会停止apache的)。
2. 在安装目录下找到php.ini,类似于D:\xampp\php\php.ini,并打开。
3. 找到被注释掉的项目(去掉前面的?)并按如下设置:
[XDebug]
zend_extension = “D:\xampp\php\ext\php_xdebug.dll”
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = “D:\xampp\tmp”
xdebug.profiler_output_name = “cachegrind.out.%t-%s”
xdebug.remote_enable = on
xdebug.remote_handler = “dbgp”
xdebug.remote_host = “127.0.0.1”
xdebug.trace_output_dir = “D:\xampp\tmp”
xdebug.idekey= PHPSTROM
最初的设置是这样的
;的意思是被注释掉了,所以要先去掉;号;
然后开启xdebug.remote_enable = on;
还要增加xdebug.idekey= PHPSTROM。
其中remote_host 是指调试客户端的地址,即IDE所在的IP,同理remote_port 是客户端的端口,这两项在远程调试的情况下注意修改,远程的时候最终改为:
[XDebug]
zend_extension = “D:\xampp\php\ext\php_xdebug.dll”
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = “D:\xampp\tmp”
xdebug.profiler_output_name = “cachegrind.out.%t-%s”
xdebug.remote_enable = 1
xdebug.remote_handler = “dbgp”
xdebug.remote_mode = “req”
xdebug.remote_port = 9000
4. 保存文件,重新启动apache检查是否成功开启了xdebug服务。
文章来源:xampp中文组官网
转载请注明:XAMPP中文组官网 » 本地环境 XAMPP+phpStorm+XDebug+chrome 配置和断点调试