Download the PHP package it-al-perugia/phalcon-debugbar without Composer
On this page you can find all versions of the php package it-al-perugia/phalcon-debugbar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download it-al-perugia/phalcon-debugbar
More information about it-al-perugia/phalcon-debugbar
Files in it-al-perugia/phalcon-debugbar
Package phalcon-debugbar
Short Description Integrates PHP Debug Bar with Phalcon.
License MIT
Informations about the package phalcon-debugbar
Phalcon Debugbar
Integrates PHP Debug Bar with Phalcon Framework.
Features
- Normal request capturing
- Ajax request capturing
- Redirect request chain capturing
- Simple App, Multi module App and Micro App support
- Data collected persistent : save to Local File or MongoDB, or ElasticSearch
- Data storaged by sessionid, it's more firendly for team development.
- You can close inject debugbar, and on a new browser tab, visit
/_debugbar/open
to see data(and it alse can be disabled). - Whoops Integration, and debugbar works well with it.
- Support palcon 1.3.x,2.x,3.x, PHP5.5~7.1
Support Collectors
- MessagesCollector: Collect custom message, support scalar, array and object
- TimeDataCollector: Collect custom time measure.
- ExceptionsCollector: Add a exception object to debugbar.
- MemoryCollector: Collect memory usage
- QueryCollector: Capture each SQL statement, measure spent time of each SQL, show EXPLAIN result of each SELECT statement
- collect information from the
db
service. Only for Phalcon ORM.
- collect information from the
- DoctrineCollector: Capture each SQL statement in Doctrine, measure spent time of each SQL.
- collect information from the
entityManager
service. Only for Doctrine ORM.
- collect information from the
- RouteCollector: Show Route info of current request.
- collect information from the
router
service.
- collect information from the
- ViewCollector: Show all the rendered templates, measure spent time of each template, show all the templates variables.
- collect information from the
view
service.
- collect information from the
- PhalconRequestCollector: Show request headers, cookies, server variables, response headers, querys, post data,raw body
- collect information from the
request
service.
- collect information from the
- ConfigCollector: Show the data in the config service.
- collect information from the
config
service.
- collect information from the
- SessionCollectior: Show session data
- collect information from the
session
service.
- collect information from the
- SwiftMailCollector: mailer info
- collect information from the
mail
service.
- collect information from the
- LogsCollectors: Show logs of current request. Support
Phalcon\Logger
and Monolog- collect information from the
log
service.
- collect information from the
- CacheCollectors: Show caches summary (saved,gets,incs,decs,failds), and each cache operation detail.
- collect information from the
cache
service.
- collect information from the
Quick start
composer
-
install
- update
Modify index.php
-
Set your App Instance to DI:
-
Before handle app, register and boot debugbar provider.
- optional to use Whoops, modify the index.php, add follow codes bellow the debugbar service
start()
method.
Modify The ACL Code
Here is a example for INVO:
Data Persistent
For file driver, the default directory for store debugbar data is Runtime/phalcon
. If it doesn't exist, it will be created automatically. You can change it by reconfig.
For mongodb driver, You must install the mongodb extension and install the phplib : composer require mongodb/mongodb
For elastic driver, You must install the phplib : composer require elasticsearch/elasticsearch:some-version
About baseUri
Be aware of the baseUri configuration of your project, you must set a currect baseUri for your uri service.
If you are using apache, you should enable the Rewrite mod and have a .htaccess
file under the baseUri directory.
If you are using nginx, you should enable the Rewrite mod and edit the location block of the server configuration like this:
More
Use your config
Copy config/debugbar.php
to your config directory, and change any settings you want. Then use your debugbar config file by:
Send custom messages to debugbar
Volt Functions:
Examples
Multi Modules
Usually, You needn't modify any other files, if you follow rules bellow:
- All the services for cache has a name contain
cache
. - All the services for db has a name start with
db
or end withdb
. - Visit
/_debugbar/open?m={modulename}
to open a independent debugbar page.
If your service name is't match these rules, you need attach it to debugbar:
Troubleshooting
-
I strongly suggest you to assign a host domain to your project, and set the baseUri of
uri
service to/
. -
For ajax/json request, the debug data only stored in the persistent directory as a json file. You can Load it to the debugbar form Openhandler(Open icon on the right).
-
If the debugbar does not work, the most likely reason is that one or more collectors triggered a error in the runtime. You can modify the debugbar config file, close collector one by one, retry it until found the collector cause problem.
- For any problems, you can open an Issue on Github.