Atlas Forms
Variable Inspector
The variable-inspector is a developer diagnostic control that renders the current form state — field values, context data, and metadata — as formatted, collapsible JSON. It updates in real time as the user interacts with the form. Use it during development and hide it completely in production modes.
Example
{
"id": "debug-inspector",
"type": "variable-inspector",
"label": "Developer: Form State",
"width": "full",
"modeVisibilitySettings": {
"edit": false,
"view": false,
"admin": false,
"preview": false,
"design": true
}
}
Settings Reference
| Setting | Type | Default | Description |
|---|---|---|---|
showValues | boolean | true | Include the form field values ($json source) |
showContext | boolean | true | Include the form execution context ($context source) |
showMetadata | boolean | true | Include form metadata (formId, mode, userId, etc.) |
height | string (CSS) | "400px" | Height of the JSON panel (scrollable) |
collapsed | boolean | false | Start with all JSON tree nodes collapsed |
filterPath | string | — | Show only a specific subtree — e.g., "context.analytics" |
What the Inspector Shows
The inspector renders three sections:
{
"values": {
// All current field values — the $json source
"customerName": "Acme Corp",
"contractValue": 50000,
"invoiceLines": [
{ "description": "Consulting", "qty": 5, "unitPrice": 150, "total": 750 }
]
},
"context": {
// The execution context — the $context source
"customer": { "id": "cust-123", "tier": "enterprise" },
"analytics": { "pageViews": [...] }
},
"metadata": {
"formId": 12001,
"mode": "edit",
"userId": "user-456",
"tenantId": "tenant-789",
"timestamp": "2025-05-25T10:30:00Z"
}
}
Filtered Inspector — Debugging a Specific Subtree
When you only need to inspect a specific part of the context (e.g., a chart binding), use filterPath to limit output:
{
"id": "analytics-inspector",
"type": "variable-inspector",
"label": "Context: analytics subtree",
"settings": {
"showValues": false,
"showContext": true,
"filterPath": "context.analytics",
"height": "300px",
"collapsed": false
},
"modeVisibilitySettings": {
"edit": false, "view": false, "admin": false, "preview": false, "design": true
}
}
Live Update Behaviour
The inspector subscribes to the form state and re-renders as JSON every time any field value or context value changes. This makes it extremely useful for:
- Verifying that a computed field is calculating correctly.
- Confirming that an
onLoadAPI action populated the correct context paths. - Checking that cascading select options are receiving the right dependent values.
- Validating that chart data arrays have the expected structure before debugging chart rendering.
- Watching real-time context updates arrive via SignalR without opening browser DevTools.
Never Leave This Visible in Production
The variable inspector exposes all form field values and context data as raw JSON, including any sensitive values (IDs, amounts, personal data). Always use
modeVisibilitySettings to restrict it to design: true only, and verify this before deploying any form.