Skip to main content
Framefox provides several debug commands to help you understand your application’s configuration, routing, and service container.

Available Commands

debug:router

Display all registered routes

debug:service

Show service container info

debug:config

Display configuration values

debug:router

Displays all registered routes in your application with their HTTP methods, controllers, and parameters.

Usage

framefox debug:router

Example Output

╭─────────────────────────┬───────┬─────────────┬─────────┬──────────────────╮
 Path HTTP Controller Method Parameters
├─────────────────────────┼───────┼─────────────┼─────────┼──────────────────┤
 / GET Home index ()               │
 /api/user GET User index ()               │
 /api/user/<int:id> GET User show (id: int)        │
 /api/user POST User create (request: Reque…
 /api/user/<int:id> PUT User update (id: int, reque…
 /api/user/<int:id> DELETE│ User delete (id: int)        │
 /product GET Product index ()               │
 /product/<int:id> GET Product show (id: int)        │
 /_profiler GET Profiler index ()               │
╰─────────────────────────┴───────┴─────────────┴─────────┴──────────────────╯

Information Displayed

Path
string
The URL pattern for the route, including dynamic segments
HTTP
string
HTTP methods accepted (GET, POST, PUT, DELETE, etc.)
Controller
string
The controller class handling the route (without “Controller” suffix)
Method
string
The method name within the controller
Parameters
string
Method parameters with type hints (e.g., id: int, request: Request)

Use Cases

  • Route Discovery - See all available endpoints
  • API Documentation - Generate endpoint list
  • Debugging - Verify route registration
  • Conflict Detection - Find duplicate routes
  • Type Checking - Review parameter types

Filtered View

The command scans:
  • User controllers in src/controller/
  • Framework controllers (profiler, debug tools)

debug:service

Displays information about registered services in the dependency injection container.

Usage

framefox debug:service

Example Output

📦 Service Container Information

┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
 Service Type Status
┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
 UserRepository Repository Registered
 ProductRepository Repository Registered
 UserController Controller Registered
 ProductController Controller Registered
 Settings Configuration Singleton
 Logger Utility Singleton
 EntityManagerRegistry ORM Singleton
 SecurityContextHandler Security Registered
└──────────────────────────┴───────────────┴────────────┘

📊 Container Statistics:
- Total Definitions: 45
- Instantiated Services: 12
- Cached Resolutions: 23
- Total Aliases: 8
- Total Tags: 15

Use Cases

  • Service Discovery - See all available services
  • Dependency Debugging - Verify service registration
  • Performance Analysis - Check instantiation count
  • Container Health - Monitor service lifecycle

debug:config

Displays all environment variables and YAML configuration values.

Usage

framefox debug:config

Example Output

╔══════════════════════════════════════════╗
         Environment Variables
╚══════════════════════════════════════════╝

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
 Variable Value Source
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩
 APP_ENV dev .env
 APP_DEBUG True .env
 DATABASE_URL sql***@localhost/framefox│ .env
 SESSION_SECRET_KEY abc***xyz .env
└───────────────────────────┴──────────────────────────┴────────┘

╔══════════════════════════════════════════╗
      YAML Configuration Files
╚══════════════════════════════════════════╝

application.yaml
────────────────────────────────────────────────────────────
  app:
    name: Framefox Application
    env: ${APP_ENV}
    debug: ${APP_DEBUG}
    timezone: UTC

orm.yaml
────────────────────────────────────────────────────────────
  database:
    url: ${DATABASE_URL}
    echo: false
    pool_size: 5
    pool_recycle: 3600

security.yaml
────────────────────────────────────────────────────────────
  security:
    session:
      secret_key: ${SESSION_SECRET_KEY}
      lifetime: 3600
    authentication:
      enabled: true

╔══════════════════════════════════════════╗
        Configuration Summary
╚══════════════════════════════════════════╝

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━┓
 Configuration Type Count Status
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━┩
 Environment Variables 4 Loaded
 YAML Configuration Files 8 Available
└───────────────────────────┴───────┴────────────┘

Tip: Environment variables override YAML configuration values

Features

Sensitive Value Masking

Sensitive values are automatically masked:
  • Passwords: pas***ord
  • Secret keys: abc***xyz
  • Database URLs: sql***base
  • API keys: key***123

Value Styling

Different value types use different colors:
  • Booleans: Green (true) / Red (false)
  • Numbers: Cyan
  • Environment variables: Yellow (${VAR_NAME})
  • URLs/Paths: Blue
  • Strings: White
  • Null values: Dim italic

Configuration Sources

Shows where each value comes from:
  • ENV - System environment variable
  • .env - Local .env file
  • YAML - Configuration file

Use Cases

  • Environment Verification - Check loaded variables
  • Configuration Debugging - Find configuration issues
  • Security Audit - Review configuration values
  • Documentation - Generate config documentation
  • Deployment Validation - Verify production settings

Filtered Configuration

The command shows Framefox-related variables with these prefixes:
  • APP_*
  • DATABASE_*
  • MAIL_*
  • RABBITMQ_*
  • SESSION_*

Debug Tips

  • Run debug:router after creating new controllers
  • Use debug:config to troubleshoot connection issues
  • Check debug:service when encountering dependency injection errors
  • These commands are safe to run in production for troubleshooting

Common Debugging Workflows

New Route Not Working

# 1. Check if route is registered
framefox debug:router | grep user

# 2. If not found, verify controller is a service
framefox debug:service | grep UserController

# 3. Check server logs
framefox run

Service Not Injecting

# 1. Verify service is registered
framefox debug:service | grep MyService

# 2. Check if using @service decorator
# Edit src/service/my_service.py

# 3. Clear cache and retry
framefox cache:clear

Configuration Not Loading

# 1. Check all config values
framefox debug:config

# 2. Verify .env file exists
ls -la .env

# 3. Check YAML syntax
cat config/application.yaml

Performance Impact

Debug commands scan your application structure. They may take a few seconds on large codebases but are optimized for performance.

Output Formatting

All debug commands use rich formatting:
  • Tables - Organized, colored tables
  • Panels - Section dividers
  • Colors - Semantic coloring
  • Icons - Visual indicators

Next Steps

Cache Commands

Manage application cache

Run Server

Start development server

Build docs developers (and LLMs) love