PHP Debug on Mac
来源:互联网 发布:虐杀原形保存数据失败 编辑:程序博客网 时间:2024/05/06 17:10
初学PHP(5.6),一直苦于无法进行debug操作,通过打印日志的方式来查看debug信息,总感觉不是很直接、方便。今天通过摆渡和骨骼算是找到了比较完美的解决方案,先记录在此,后续如有更好的方法,再进行更新。
1.安装xdebug
在终端查看是否已经安装xdebug,执行操作:brew search xdebug
查看是否已经安装对应版本的xdebug,如果没有则执行安装操作
brew install homebrew/php/php56-xdebug
2.配置xdebug
使用php内置服务器启动服务:php -S 0.0.0.0:8080
查看phpinfo(),Additional .ini files parsed 配置项中包含 /usr/local/etc/php/5.6/conf.d/ext-xdebug.ini,打开该文件,添加
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
3.配置PhpStorm
Preferences…
Debug port设置成9000
操作完成,基于Built-in HTTP server用PhpStorm打开启动的项目,执行PhpStorm菜单Run->Start Listening for PHP debug Connections。请求对应的文件,即可在PhpStorm中设置断点,进行对应的debug操作。
0 0
- PHP Debug on Mac
- php Compile on Mac
- change default PHP version on MAC
- Debug PHP with Sublime Text 2 and Xdebug on Ubuntu
- PHP case sensitivity based on PHP 5.3 running on Mac OS X
- PHP debug
- php debug
- Install Apache/PHP/MySQL on Mac Snow Leopard
- Installing MSSQL Module for PHP on Mac OS X
- Brew’ing PHP, MySQL & Nginx on Mac OS X
- (ZZ)debug on rails
- Debug Mini2440 on Ubuntu
- debug on Linux
- Debug certificate expired on
- NodeJS debug on eclipse
- DEBUG SYMBOLS ON MACOSX
- mac os debug
- error,Debug,and so on
- Axure RP
- Linux终端常用命令与快捷键
- 关于mysql中 group by , order by , where, having 语句的区别与运用
- 网络之详解HTTP协议
- linux sd卡格式化
- PHP Debug on Mac
- java基础17_GUI
- SpringMVC的整体工作流程
- 沉浸式状态栏
- div+css2
- qmake找不到qmake.conf
- 深度残差网络:ResNet
- 【java学习记录】10.实现基本的记事本功能(新建、打开、另存为)和简单的加解密功能
- Eclipse各版本分析比较