Debug Commands
The debug:routes and debug:config commands print what the application actually loaded. Use them to check a route's middlewares or a config value without reading the source. They read the same objects the application uses, so the output matches the running app.
Debugging Routes
debug:routes prints every compiled route: its name, methods, pattern, handlers, middlewares, and groups.
php windwalker debug:routesTree Output
The default output is a tree that follows the group hierarchy. Group nodes show their prefix and the middlewares they add. A route line lists only the middlewares added by the route itself. This excerpt is shortened:
└── web [CanonicalizeMiddleware]
├── front [...]
│ ├── article
│ │ ├── front::article_category GET /articles[/{path:.+}]
│ │ └── front::article_item GET /article/{id:\d+}-{alias}
│ └── ...Output Modes
- No option: the group tree.
-t,--table: a flat table, with inherited middlewares included.-d,--detail: the full compiled options of every matched route.--json: the matched routes as JSON.
php windwalker debug:routes -t
php windwalker debug:routes --jsonFiltering
All filters are case-insensitive substring matches. When you combine filters, a route must match all of them.
filter(argument): the route name or pattern.-s,--search: any of name, pattern, handlers, middlewares, and groups.--nameand--pattern: match one field only.-m,--middleware: a middleware class name, short or full.--no-middleware: routes that have no middleware at all.-g,--group: a group name.-S,--stage: the part of the route name before::, such asadmin.-M,--method: an HTTP method. Routes without a method restriction match.--handler: a handler string, such as a controller class name.
php windwalker debug:routes article
php windwalker debug:routes -S admin -g dashboard -m Csrf -M POST -t
php windwalker debug:routes --handler DashboardControllerTIP
--name, --pattern, and --handler have no short options, because -n, -p, and -H are global console options.
When no route matches, the command prints No routes.
Inspecting Config
debug:config prints the config tree. Pass a dot path to print one part of it. Without a path, the command prints everything.
php windwalker debug:config
php windwalker debug:config database.connections.localOptions
-a,--app: the app whose config to print. The default ismain. Useconsolefor the console config, or any name fromfactories.apps.-s,--search: keep only entries whose path or scalar value contains the keyword. The match is case-insensitive.-D,--depth: the maximum depth to expand. Deeper values are collapsed.-f,--flat: printdot.path = valuelines instead of a tree.--json: print the result as JSON.--reveal: show values of sensitive keys instead of masking them.
php windwalker debug:config -s mail
php windwalker debug:config --app=console --flat
php windwalker debug:config -D 2 --jsonSensitive keys, such as password, secret, and token, are masked by default.
WARNING
--reveal prints secrets in plain text. Do not paste its output into a ticket, a chat, or a shared log.