PHP 设置调试工具XDebug PHPStorm IDE

先下载PHP扩展Xdebug https://xdebug.org, 能够复制本身的phpinfo粘贴到https://xdebug.org/wizard.php中, 会生成须要下载的版本, php.ini的设置语句.php

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

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=PHPSTORMapache

而后重启apache, 去设置phpstorm浏览器

 

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

若是是自定域名则host设置自定域名, 如laravel5.iodom


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


设置完毕,点OK退出。ide

 

点菜单栏的Run>Edit Configurations… 在弹出的窗口中添加一个调试配置:插件

点击左上角加号,选择PHP Web Applicationdebug

填写完毕后,在代码里设置断点, 再开启电话icno监听, 点小甲壳虫启动调试

再下个浏览器插件, xdebug helper, 下载好以后点选项, IDE选PHPSTORM, 不想让因此网页显示小甲虫, 能够设置domain filter

基本完事了, 调试就点开电话图标监听, 设置好断点, 点小甲虫开启调试了, 刷新页面可见结果

相关文章
相关标签/搜索