phalcon-tools/debugger
Composer 安装命令:
composer require phalcon-tools/debugger
包简介
Phalcon Debug toolbar
README 文档
README
Requirements
- PHP: v5.5.0+
- Phalcon: v2.0+
Installation
Include it in your composer.json file
{
"require-dev": {
"phalcon-tools/debugger": "dev-master"
}
}
Usage and Configuration
Define a debug or environment flag in your application bootstrap file so you can easily disable the Phalcon Debug Widget on production environments. e.g.
define('PHALCON_DEBUG', true);
After you have setup your \Phalcon\Loader and \Phalcon\DI\FactoryDefault() create a new instance of the debug widget.
if (PHALCON_DEBUG == true) {
$debugWidget = new \Phalcon\Debug\DebugWidget($di);
}
That's it! The Phalcon debug widget should appear along the bottom of your application!
How it works
The debug widget for now is very simplistic, however can be useful. It expects you have three services in your dependency injector named:
- db
- dispatcher
- view
It expects these services to match the Phalcon services of the same name.
When you pass the DI to Phalcon Debug Widget It looks for those specific services and does the following:
- Sets them as shared services
- Sets the eventManager for them
- Attaches itself to those events
This means passing the DI to the debug widget will alter those services. Generally speaking, a shared db, dispatcher, and view is fine. If you have ideas for other ways to hook in, please open an issue for discussion.
The Phalcon Debug Widget is designed to make development easier by displaying debugging information directly in your browser window. Currently it displays php globals such as $_SESSION as well as outputing resource usage and database queries and connection information.
Preview
Preview of the available debug panels
Server View
Views View
Database View
Request View
phalcon-tools/debugger 适用场景与选型建议
phalcon-tools/debugger 是一款 基于 HTML 开发的 Composer 扩展包,目前已累计 929 次下载、GitHub Stars 达 2, 最近一次更新时间为 2015 年 09 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 phalcon-tools/debugger 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 phalcon-tools/debugger 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 929
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-09-04