PHPStorm设置调试

 

 

先下载PHP扩展Xdebug https://xdebug.org, 可以复制自己的phpinfo粘贴到https://xdebug.org/wizard.php中, 会生成需要下载的版本, php.ini的设置语句.

下载好之后放入php目录的ext文件夹中, 然后设置php.ini, 在最后加上

zend_extension = C:\path\php\ext\php_xdebug-2.4.0rc4-5.6-vc11-x86_64.dll
xdebug.remote_enable =1
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.remote_mode = req
xdebug.remote_port = 9000
xdebug.idekey=PHPSTORM

然后重启apache, 去设置phpstorm

. 进入File>Settings>PHP>Servers,这里要填写服务器端的相关信息: 
name: localhost, 
host: localhost, 
port: 80, 
debugger: XDebug

如果是自定域名则host设置自定域名, 如laravel5.io

2. 进入File>Settings>PHP>Debug,找到XDebug选项卡,port填9000
进入File>Settings>PHP>Debug>DBGp Proxy 填写: 
IDE key: phpStorm 
host: localhost 
port: 80

 

 

 

 

posted @ 2016-11-11 09:43  luwanyoyo  阅读(213)  评论(0编辑  收藏  举报