PHPstorm配置Xdebug

主要用于笔记使用,仅供参考:

 

1.先下载对应版本的xdebug文件放到 php目录下边的ext文件夹下;

2.配置php.ini文件添加

[XDebug]
xdebug.remote_enable = on
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir="E:\WAMP\tmp\xdebug"
xdebug.trace_output_dir="E:\WAMP\tmp\xdebug"
xdebug.remote_handler=dbgp
zend_extension="E:\WAMP\php\php-7.0.12-nts\ext\php_xdebug.dll"
xdebug.remote_port = 9000
xdebug.idekey = PHPSTORM

自行修改相应路径;

文件下载地址:http://pecl.php.net/package/xdebug/2.7.0/windows

3.按如下步骤操作:

汉化的相应名称应该是默认设置,

 

输入相关的PHP.exe文件地址

 

 

这里的9000和  xdebug.remote_port = 9000一致,

 

IDE key和  xdebug.idekey = PHPSTORM 一致

host 填写要调试的路径,一般是本地 localhost 远端的话需要配置远端的PHP服务器。

prot 和xdebug.remote_port = 9000一致,如果不好使就使用PHP服务器使用的端口(80);

4.

start URL填写准确的URL地址,框架的话写到入口文件(index.php)文件就行。

 

 5.之后基本上就可以使用断点调试了

可以用F7,F8,F9三个键调试。

posted on 2017-03-09 22:31  降魔  阅读(89)  评论(0)    收藏  举报