Visual Tools β
Integrated visual debug system for rapid development β the "X-ray" that shows how everything works internally.

Debug System offers complete visibility into what happens during rendering:
π§ What It Shows: β
| Information | Where It Appears | When It Updates | Useful For |
|---|---|---|---|
| Form State | Debug Panel | On every change | See values in real-time |
| Schema Applied | Schema Inspector | When schema changes | Validate structure |
| Component Resolution | Component Tree | On every render | Debug registry conflicts |
| Middleware Pipeline | Pipeline Tracer | Per execution | Performance tuning |
| Performance Metrics | Performance Monitor | Continuously | Optimization |
π Automatic Activation: β
Development Mode:
text
NODE_ENV=development β Debug Panel active automaticallyManual Override:
text
REACT_APP_DEBUG_schepta=true β Force debug in productionRuntime Toggle:
javascript
window.schepta_DEBUG = true; // Activate debug via consoleπ‘ Result: Complete system transparency. Visual debug without configuration!
π Debug System Components β
Each tool has a specific function:
π Debug Panel - Main Panel: β
| Section | Content | Update | Interaction |
|---|---|---|---|
| Form Values | Current field values | Real-time | Read-only view |
| Validation State | Errors, touched, dirty | On validation | Click to see details |
| Schema Tree | Schema structure | On schema change | Expandable tree |
| Component Map | Resolved components | On render | Click to inspect |
| Performance | Render timing | Continuous | Hover for details |
π Schema Inspector - Schema Analysis: β
| Feature | Visualization | Purpose | Navigation |
|---|---|---|---|
| Schema Tree | Hierarchical view | See complete structure | Expand/collapse |
| Property Details | Key-value pairs | See properties | Click for details |
| Validation Rules | Rule list | See applied rules | Hover for description |
| Component Mapping | Schema β Component | See resolution | Click for component |
ποΈ Component Tree - Hierarchy Viewer: β
| Information | Display | Purpose | Actions |
|---|---|---|---|
| Component Name | Tree node | Identify component type | Click to inspect |
| Props | Expandable object | See current props | Edit in devtools |
| Registry Source | Badge | See where component came from | Trace resolution |
| Render Count | Counter | Performance monitoring | Reset counter |
β‘ Performance Monitor - Real-Time Metrics: β
| Metric | Measurement | Threshold | Alert |
|---|---|---|---|
| Render Time | Milliseconds per render | > 16ms | Performance warning |
| Re-render Count | Count per interaction | > 5 | Optimization needed |
| Schema Processing | Time to process schema | > 50ms | Complex schema warning |
| Memory Usage | Component memory | > 10MB | Memory leak warning |
βοΈ Debug Architecture β
How the debug system works internally:
π Debug Pipeline: β
| Stage | Process | Data Collected | Storage |
|---|---|---|---|
| 1. Hook Installation | Install debug hooks | Component lifecycle | Debug context |
| 2. Data Collection | Collect render data | Props, state, timing | Circular buffer |
| 3. Processing | Process collected data | Metrics, relationships | Computed state |
| 4. Visualization | Update debug UI | Current snapshot | React/Vue state |
| 5. Interaction | Handle user interaction | User selections | Local state |
π― Data Collection Strategy: β
Render Tracking:
typescript
const debugData = {
timestamp: Date.now(),
component: componentName,
props: cloneDeep(props),
schema: cloneDeep(schema),
renderTime: performance.now() - startTime,
memoryUsage: getMemoryUsage()
};Pipeline Tracking:
typescript
const pipelineTrace = {
middlewareName: middleware.name,
inputProps: cloneDeep(inputProps),
outputProps: cloneDeep(outputProps),
executionTime: executionEnd - executionStart,
errors: capturedErrors
};Performance Tracking:
typescript
const performanceMetrics = {
renderCount: renderCount,
totalRenderTime: totalTime,
averageRenderTime: totalTime / renderCount,
memoryDelta: currentMemory - previousMemory
};π Debug Features β
Specific functionalities for each type of problem:
π§ Form Debug Features: β
| Feature | Purpose | Data Shown | Actions Available |
|---|---|---|---|
| Value Inspector | See current values | Real-time form state | Copy values |
| Validation Tracer | Debug validation | Rules + results | Test validation |
| Field Mapper | Schema to component | Field mapping | Inspect component |
| Submit Tracer | Debug form submission | Submit data flow | Simulate submit |
π§ Menu Debug Features: β
| Feature | Purpose | Data Shown | Actions Available |
|---|---|---|---|
| Navigation Tree | Menu structure | Hierarchical menu | Expand/collapse |
| Visibility Logic | Debug show/hide | Visibility expressions | Test conditions |
| Route Mapping | Menu to routes | URL mappings | Navigate directly |
| Permission Check | Debug permissions | Permission logic | Test with roles |
π¨ Component Debug Features: β
| Feature | Purpose | Data Shown | Actions Available |
|---|---|---|---|
| Registry Inspector | Debug component resolution | Resolution chain | Override components |
| Props Tracer | Debug props flow | Middleware pipeline | Test transformations |
| Context Viewer | Debug context | Context values | Modify context |
| Render Profiler | Debug performance | Render metrics | Profile renders |
π‘ Related Concepts β
Debug System is "observability" for all other concepts:
- 01. Factories: Debug shows how factories process schemas
- 04. Schema Resolution: Debug tracks resolution steps
- 05. Renderer: Debug shows which renderer was chosen
- 06. Middleware: Debug displays applied middleware
- 03. Provider: Debug configured via Provider
- 02. Schema Language: Debug validates schema syntax