Provides console commands for managing the ADP debug system.
- Composer:
app-dev-panel/cli - Namespace:
AppDevPanel\Cli\ - PHP: 8.4+
- Dependencies:
app-dev-panel/kernel,app-dev-panel/api,app-dev-panel/mcp-server, Symfony Console, Symfony Process
src/
├── Command/
│ ├── DebugServerCommand.php # Start debug socket server (dev)
│ ├── DebugResetCommand.php # Clear debug data (debug:reset)
│ ├── DebugServerBroadcastCommand.php # Broadcast test messages (dev:broadcast)
│ ├── DebugQueryCommand.php # Query stored debug data (debug:query)
│ ├── DebugSummaryCommand.php # Show brief summary of debug entry (debug:summary)
│ ├── DebugDumpCommand.php # View dumped objects (debug:dump)
│ ├── DebugTailCommand.php # Watch entries in real-time (debug:tail)
│ ├── ServeCommand.php # Start HTTP debug server (serve)
│ ├── McpServeCommand.php # Start MCP server for AI integration (mcp:serve)
│ ├── FrontendUpdateCommand.php # Download latest frontend build (frontend:update)
│ ├── InspectConfigCommand.php # Inspect application config (inspect:config)
│ ├── InspectDatabaseCommand.php # Inspect database schema/data (inspect:db)
│ └── InspectRoutesCommand.php # Inspect application routes (inspect:routes)
└── Server/
└── server-router.php # Router for built-in PHP server (bootstraps API)
tests/
└── Unit/
└── Command/
├── DebugDumpCommandTest.php
├── DebugQueryCommandTest.php
├── DebugServerBroadcastCommandTest.php
├── DebugServerCommandTest.php
├── DebugSummaryCommandTest.php
├── DebugTailCommandTest.php
├── FrontendUpdateCommandTest.php
├── InspectConfigCommandTest.php
├── InspectDatabaseCommandTest.php
├── InspectRoutesCommandTest.php
├── McpServeCommandTest.php
├── ResetCommandTest.php
└── ServeCommandTest.php
Starts a UDP socket server that listens for real-time debug messages from the application.
php yii dev # Default: 0.0.0.0:8890
php yii dev -a 127.0.0.1 -p 9000 # Custom address and portThe server receives and categorizes messages:
MESSAGE_TYPE_VAR_DUMPER— Variable dumpsMESSAGE_TYPE_LOGGER— Log messages- Plain text messages
Handles SIGINT (Ctrl+C) for graceful shutdown.
Stops the debugger and clears all stored debug data.
php yii debug:resetCalls Debugger::stop() and StorageInterface::clear().
Sends test messages to all connected debug server clients. Useful for verifying connectivity.
php yii dev:broadcast # Default: "Test message"
php yii dev:broadcast -m "Hello world" # Custom messageBroadcasts in both MESSAGE_TYPE_LOGGER and MESSAGE_TYPE_VAR_DUMPER formats.
Query stored debug data from the CLI. Subcommands: list, view.
debug:query list # List recent entries (default 20)
debug:query list --limit=5 # Limit entries
debug:query list --json # Raw JSON output
debug:query view <id> # Full entry data
debug:query view <id> -c <CollectorFQCN> # Specific collector dataUses CollectorRepositoryInterface to read from storage.
Starts a standalone HTTP server using PHP built-in server, serving the ADP API directly.
serve # Default: 127.0.0.1:8888
serve --host=0.0.0.0 --port=9000 # Custom host/port
serve --storage-path=/path/to/debug/data # Custom storage
serve --frontend-path=/path/to/built/assets # Serve frontendStarts an MCP (Model Context Protocol) server over stdio, exposing ADP debug data to AI assistants.
mcp:serve --storage-path=/path/to/debug/data # Required: path to debug storageCreates FileStorage and McpToolRegistry, then runs McpServer over StdioTransport.
composer test # Runs PHPUnit