Visual Debugger Overview
Using the Flow Debugger
NOPE-PRO Visual Debugger Guide
The NOPE-PRO Visual Debugger provides real-time visualization of your Result chains, making it easy to understand complex operation flows and debug issues.
Overview
The Visual Debugger transforms your Result chains into visual flows showing:
- Success Path (Green): Operations that completed successfully
- Failure Path (Red): Operations that failed with errors
- Handled Path (Yellow): Failed operations properly handled by Match/Finally
Architecture
Key Features
- Real-time flow tracking with millisecond precision
- Thread-safe operation recording
- Caller information tracking (file, line, method)
- Visual distinction between success, failure, and handled paths
- Railway-oriented visualization in Editor
Enabling Visual Debugging
Step 1: Enable Debug Mode
Option A: Using NOPE Settings Window (Recommended)
- Go to Window → NOPE PRO → Settings
- Toggle Debug Mode to enable
- Click Apply Changes
- Unity will automatically add
NOPE_PRO_DEBUG
to Scripting Define Symbols and recompile
Option B: Manual Configuration
- Go to Edit → Project Settings → Player
- Under Other Settings → Configuration
- Add
NOPE_PRO_DEBUG
to Scripting Define Symbols - Click Apply
Step 2: Enable Debug on Results
Add .EnableDebug()
to any Result chain:
Using the Flow Debugger Window
Opening the Window
Go to Window → NOPE PRO → Flow Debugger
Window Layout
-
Toolbar
- Clear All: Remove all tracked flows (with confirmation)
- Enable Tracking: Toggle flow tracking on/off
- Auto Refresh: Toggle automatic UI updates
- Statistics: Shows Active/Done/Steps counts
-
Flow List Panel (Left)
- Active Flows: Currently executing operations
- Completed Flows: Finished flows (up to 100)
- Each flow shows:
- Flow name
- Status badge (ACTIVE/SUCCESS/HANDLED/FAILED)
- Step count
- Start time
- Duration (for completed flows)
- Click to select a flow for detailed view
-
Flow Visualization Panel (Right)
Flow Details Section:
- Flow name and unique ID
- Method and file location (clickable)
- Overall status with color indicator
- Total duration and step count
- Success rate percentage
Railway Visualization:
- Horizontal railway-style flow chart
- Success track (top) and Failure track (bottom)
- Each node shows:
- Operation name
- Type transformation (T→U)
- Execution time
- Value/Error preview
- Branch connections when flow switches tracks
- Final result indicator
Selected Node Details:
- Full operation information
- Input/Output types
- Execution time with performance warnings
- Thread ID and timestamp
- Source location (clickable)
- Full value/error inspection (when debug enabled)
Visual Indicators
- 🟢 Success: Flow completed successfully
- 🔴 Failure: Flow failed with unhandled error
- 🟡 Handled: Flow failed but was properly handled
- 🔵 Active: Flow currently executing
Using the Runtime Overlay
Activating the Overlay
-
Use
FlowDebuggerOverlay
component. -
Press F9 during play mode to toggle the overlay.
Overlay Features
- Active Flows: Currently executing operations
- Recent Flows: Last completed flows
- Flow Details: Operation steps with timing
- Color Coding: Same as editor window
NOPE Settings Window
Access via Window → NOPE PRO → Settings
Available Settings
-
Debug Mode
- Enables/disables
NOPE_PRO_DEBUG
define - Required for visual debugging features
- Enables/disables
-
Async Support (mutually exclusive)
- UniTask Support: Enable UniTask integration
- Unity Awaitable Support: Enable Unity 2023.1+ awaitable support
-
Window Settings
- Auto-show on Startup: Show settings on project open
-
System Information
- Shows Unity version
- UniTask package status
- Awaitable support availability
- Current build target
Quick Actions
- Open Player Settings: Direct access to project settings
- Open Package Manager: Install UniTask if needed
- Open Flow Debugger: Quick access to debugger window
Available Extension Methods
All extension methods maintain railway-oriented programming semantics while adding tracking:
Starting Debug Flows
Object Inspection
When NOPE_PRO_DEBUG
is enabled, the Flow Debugger Window provides deep object inspection:
Practical Examples
Basic Flow Tracking
Complex Chain with Error Handling
Async Operations with UniTask
Manual Flow Control
Performance Considerations
- Minimal overhead when
NOPE_PRO_DEBUG
is not defined - Use conditional debugging for performance-critical paths
- Delete all debug code before release.
Troubleshooting
Debug Not Working
- Verify
NOPE_PRO_DEBUG
is defined via NOPE Settings - Ensure Enable Tracking is toggled on in Flow Debugger
- Check that
.EnableDebug()
is called on your Result chain - Verify the operation actually executed
Missing Flow Data
- Flows auto-complete after 5 seconds of inactivity
- Maximum 100 completed flows are retained
- Check if flow was replaced due to memory limits
- Ensure Auto Refresh is enabled for real-time updates
Performance Impact
- Disable
NOPE_PRO_DEBUG
for release builds - Use conditional compilation for production code
- Monitor active flow count in toolbar statistics
- Clear old flows periodically if debugging long sessions
Summary
The Visual Debugger provides comprehensive flow tracking with:
- ✅ Real-time Editor window with railway visualization
- ✅ Runtime overlay for in-game debugging
- ✅ Thread-safe operation recording
- ✅ Automatic memory management
- ✅ Deep object inspection capabilities
- ✅ NOPE Settings window for easy configuration
- ✅ Production-ready with conditional compilation