PHPStorm 配置XDebug 调试PHP代码 详细教程
2015-07-22 16:41
881 查看
【PHP配置】
为PHP安装xdebug,方法略。
配置文件php.ini
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
;开启自动跟踪
xdebug.auto_trace = On
;开启异常跟踪
xdebug.show_exception_trace = On
;开启远程调试自动启动
xdebug.remote_autostart = On
;开启远程调试
xdebug.remote_enable = 1
;收集变量
xdebug.collect_vars = On
;收集返回值
xdebug.collect_return = On
;收集参数
xdebug.collect_params = On
xdebug.trace_output_dir = "C:\xampp\tmp"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.idekey=PhpStorm
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000
【phpstorm配置】
File>Settings>Languages&Frameworks>PHP>Servers
添加一个Server。
File>Settings>Languages&Frameworks>PHP>Debug
看到XDebug选项卡,port填9000,其他默认。
File>Settings>Languages&Frameworks>PHP>Debug>DBGp Proxy
IDE key 填 phpStorm,host 填localhost,port 填82。
浏览器设置(火狐、谷歌使用另外的方式)
衔接 http://www.jetbrains.com/phpstorm/marklets,在左边填上phpStorm,点generate,把下面的链接添加到收藏夹,方便调用。
Run>Edit Configurations
添加Web调试服务器
启动监听
在phpstorm中设置断点后,启动监听,就是电话一样的图标。用chrome浏览localhost中的指定断点的文件,会自动进入断点,在phpstorm中看到调试信息。
为PHP安装xdebug,方法略。
配置文件php.ini
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
;开启自动跟踪
xdebug.auto_trace = On
;开启异常跟踪
xdebug.show_exception_trace = On
;开启远程调试自动启动
xdebug.remote_autostart = On
;开启远程调试
xdebug.remote_enable = 1
;收集变量
xdebug.collect_vars = On
;收集返回值
xdebug.collect_return = On
;收集参数
xdebug.collect_params = On
xdebug.trace_output_dir = "C:\xampp\tmp"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.idekey=PhpStorm
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000
【phpstorm配置】
File>Settings>Languages&Frameworks>PHP>Servers
添加一个Server。
File>Settings>Languages&Frameworks>PHP>Debug
看到XDebug选项卡,port填9000,其他默认。
File>Settings>Languages&Frameworks>PHP>Debug>DBGp Proxy
IDE key 填 phpStorm,host 填localhost,port 填82。
浏览器设置(火狐、谷歌使用另外的方式)
衔接 http://www.jetbrains.com/phpstorm/marklets,在左边填上phpStorm,点generate,把下面的链接添加到收藏夹,方便调用。
Run>Edit Configurations
添加Web调试服务器
启动监听
在phpstorm中设置断点后,启动监听,就是电话一样的图标。用chrome浏览localhost中的指定断点的文件,会自动进入断点,在phpstorm中看到调试信息。
相关文章推荐
- 7个鲜为人知却非常实用的PHP函数
- IIS7.5 安装Drupal之Error 500问题的解决
- vsftp 建立虚拟用户服务器
- Laravel常见的问题
- ThinkPHP 3.2 开放 cache注缓存,过滤非法字符
- Laravel根据命名路由的名称获取地址
- php -- 对象遍历
- Laravel5中生成指定文件的说明文档
- 陈力:传智播客古代 珍宝币 泡泡龙游戏开发第30讲:PHP多维数组
- 解决getOutputStream() has already been called for this response
- PHP 不使用新变量而交换现有两个变量的值
- 陈力:传智播客古代 珍宝币 泡泡龙游戏开发第28讲:PHP数组
- php取整函数ceil,floor,round,intval函数的区别
- 陈力:传智播客古代 珍宝币 泡泡龙游戏开发第27讲:PHP位运算
- php获取当月天数及当月第一天及最后一天、上月第一天及最后一天实现方法
- FileOutputStream&FileInputStream
- 陈力:传智播客古代 珍宝币 泡泡龙游戏开发第26讲:PHP函数
- auth-booster配置和使用(yii1.5)
- PHP
- ThinkPHP 3.2.3框架 微信TOKEN验证失败