Debugging Moxie
Moxie avoids console.log() in committed code. For inspection, use the debugga query parameter on any request.
Basics
- Single flag:
?debugga=setup:request
- Multiple flags (comma-separated):
?debugga=route,config,mapping
- List all options:
?debugga=debuggas
Example (local):
http://localhost:3001/fn/hello?debugga=route,config
Setup & router
| Flag |
What you see |
setup:lambda |
Lambda / cold-start related context |
setup:request |
Parsed request (method, path, body, querystrings, headers) |
setup:settings |
Loaded settings bundle |
setup:identity |
Site, env, URLs, flags, hosts |
routes |
Route table / routing overview |
route |
Matched route + resolution details |
route:handle |
Handler invocation trace |
config |
Merged endpoint config after querystring processing |
timeout |
Timeout-related diagnostics |
JSON API framework
| Flag |
What you see |
mapping |
Mapping pipeline output |
mapping:internal |
Internal mapping steps |
compute |
compute helper results |
source |
Raw source / upstream response |
source_items |
Per-item source details |
source.url |
Resolved source URLs |
request.querystrings |
Parsed querystrings |
request.querystrings:pre |
Pre-processing querystrings |
request.querystrings:post |
Post-processing querystrings |
Template framework
| Flag |
What you see |
inputs |
Template input object |
template |
Rendered template output |
Other
| Flag |
What you see |
logs |
Structured moxie.log entries |
debuggas |
Enumeration of available debugga keys |
Exact availability can vary slightly by endpoint and framework; if in doubt, use debuggas on the URL you are testing.