配置phpStorm+xdebug
添加php解释器,这里选择php5.6.27版本的
添加php.exe可执行文件路径,添加xdebug方便后续调试程序。
配置xdebug
在php.ini中配置xdebug
在文件尾部添加如下配置(部分路径需自己修改)
[XDebug]
xdebug.profiler_output_dir="D:\phpstudy\PHPTutorial\tmp\xdebug"
xdebug.trace_output_dir="D:\phpstudy\PHPTutorial\tmp\xdebug"
zend_extension="D:\phpstudy\PHPTutorial\php\php-5.6.27-nts\ext\php_xdebug.dll"
xdebug.remote_enable=On
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.auto_trace=On
xdebug.idekey="php"
xdebug.collect_return=On
xdebug.collect_params=On
配置完后,重启apache服务
返回到PhpStorm的设置中进行xdebug相关的配置
配置Debug,Debug port 和之前php.ini中的配置保持一致。
配置DBGp Proxy
配置servers
到此,xdebug配置完成!
验证xdebug是否有效
继续配置运行时环境(php web page)