bdk / debug
Browser/javascript like console class for PHP
Installs: 8 447
Dependents: 2
Suggesters: 0
Security: 0
Stars: 79
Watchers: 7
Forks: 4
Open Issues: 2
Requires
- php: >=5.4.0
- bdk/http-message: ^1.3.3 || ^2.3.3 || ^3.3.3
- jdorn/sql-formatter: ^1.2
Requires (Dev)
- bdk/devutil: dev-master
- bdk/wamp-publisher: dev-master
- doctrine/dbal: >=2.5
- guzzlehttp/psr7: ^1.6
- monolog/monolog: >=1.0
- php-curl-class/php-curl-class: >=8.6
- phpunit/phpunit: ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0
- psr/log: >=1.0
- psr/simple-cache: >=1.0
- slim/slim: ^2.0
- squizlabs/php_codesniffer: ^3.6
- swiftmailer/swiftmailer: >=5.0
- symfony/http-foundation: >=2.8
Suggests
- bdk/debug-wamp-client: Client to display logging published via PHPDebugConsole's WAMP plugin
- bdk/wamp-publisher: Publish messages to a WAMP (Web Application Messaging Protocol) router. Required for Wamp route.
- psr/log: PSR-3 : Common interface for logging libraries
Replaces
- bdk/backtrace: 2.2.3
- bdk/curl-http-message: 1.0
- bdk/errorhandler: 3.3.4
- bdk/promise: 1.0
- bdk/pubsub: 3.2
- bdk/slack: 1.0
- bdk/teams: 1.0
- dev-master
- 3.5.x-dev
- 3.4.x-dev
- v3.4.1
- v3.4
- 3.3.x-dev
- v3.3.1
- v3.3
- 3.2.x-dev
- v3.2
- v3.1.2
- v3.1.1
- v3.1
- 3.0.x-dev
- v3.0.7
- v3.0.6
- v3.0.5
- v3.0.4
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0
- v3.0b3
- v3.0b2
- v3.0b1
- v2.3.x-dev
- v2.3.1
- v2.3
- v2.2
- v2.1.1
- v2.1
- v2.0.2
- v2.0.1
- v2.0
- v1.3.2
- v1.3.1
- v1.3
- v1.3b2
- v1.3b
- v1.2.1
- v1.2
- dev-dependabot/npm_and_yarn/src/Debug/form-data-4.0.4
This package is auto-updated.
Last update: 2025-08-03 02:02:51 UTC
README
Browser/javascript like console class for PHP
Log, Debug, Inspect
Website/Usage/Examples: http://www.bradkent.com/php/debug
- PHP port of the javascript web console api
- multiple simultaneous output options
- ChromeLogger
- FirePHP (no FirePHP dependency!)
- HTML
- Plain text / file
- <script>
- WebSocket (WAMP)
- "plugin"
- "Collectors" / wrappers for
- Guzzle
- Doctrine
- Mysqli
- PDO
- PhpCurlClass
- SimpleCache
- SoapClient
- SwiftMailer
- more
- PSR-3 (Logger) Implementation
- PSR-15 (Middleware) Implementation
- custom error handler
- errors (even fatal) are captured / logged / displayed
- optionally send error notices via email (throttled as to not to send out a flood of emails)
- password protected
- send debug log via email / Discord / Slack / MS Teams
Installation
This library supports PHP 5.4 - 8.4
It is installable and autoloadable via Composer as bdk/debug.
{ "require": { "bdk/debug": "^3.4", } }
installation without Composer
As of v3.3 this is no longer officially supported due to now requiring one or more dependencies.
Usage
See http://www.bradkent.com/php/debug
PSR-3 Usage
PHPDebugConsole includes a PSR-3 implementation (which can be used as a monolog PSR handler). If you're using an application or library that uses these standards, drop PHPDebugConsole right in.
(this library includes neither psr/log or monolog/monolog. Include separately if needed.)
PSR-3:
// instantiate PHPDebugLogger / get instance $debug = \bdk\Debug::getInstance(); $psr3logger = $debug->logger; $psr3logger->emergency('fallen and can\'t get up');
monolog:
$monolog = new \Monolog\Logger('myApplication'); $monolog->pushHandler(new \bdk\Debug\Collector\MonologHandler($debug)); $monolog->critical('all your base are belong to them');
Methods
- log
- info
- warn
- error
- assert
- clear
- count
- countReset
- group
- groupCollapsed
- groupEnd
- profile
- profileEnd
- table
- time
- timeEnd
- timeLog
- trace
- … more