Overview
The debugger provides:- Automatic graph generation of your entire dialogue tree
- Real-time visualization as dialogue is added or modified
- Live highlighting showing which entries have been visited
- Branch ID display to understand dialogue organization
- Connection visualization showing all gotos and branches
- Entry details including text, options, conditions, and metadata
Accessing the Debugger
Run your game from the Godot editor
The debugger only works when running from the Godot editor (not standalone builds):
Open the Debugger panel
Go to Debugger → DialogueEngine in the bottom panel of the Godot editor while your game is running.
Understanding the Graph
Node Structure
Each dialogue entry appears as a node showing:- Title: Entry name (if set) and entry ID
- Branch ID: Which branch this entry belongs to
- Text: The dialogue text content
- Format: Dynamic formatting data (if any)
- Goto: Top-level goto connection (if set)
- Options: Player choices (if any)
- Condition: Condition callable (if conditional entry)
- Metadata: Custom metadata attached to the entry
Connection Types
| Connection | Visual | Meaning |
|---|---|---|
| Goto | Single line | Explicit jump to another entry |
| Default flow | Single line | Automatic progression to next entry in same branch |
| Option | Multiple lines | Each option leads to different entry |
| Condition | Two lines | True/false branches |
Node Colors
The debugger uses colors to show dialogue state:| Color | Meaning |
|---|---|
| Default (gray) | Entry not yet visited |
| Blue | Entry was previously visited |
| Green | Current entry (last visited) |
| Red | Dialogue was canceled at this entry |
Naming Entries for Easier Debugging
Give your entries meaningful names to make the graph more readable:"Village_Intro - ID: 0" instead of just "DialogueEntry ID: 0".
Setting the Engine Name
When you have multiple DialogueEngine instances, set names to identify them:Identifying Unreachable Dialogue
The debugger highlights disconnected entries - dialogue that can never be reached:Unreachable entries are not necessarily bugs - you might be building dialogue incrementally or keeping alternate versions for testing.
Debugging Branching Dialogue
Visualizing Branch IDs
Each node displays its branch ID, helping you understand the logical organization:Following Goto Connections
Goto connections appear as arrows between nodes:Start → End (skipping Middle).
Debugging Options and Conditions
Options Display
Entries with options show all available choices:Condition Display
Conditional entries show the condition callable:Real-Time Visualization
Dynamic Dialogue
The debugger updates as you add entries dynamically:Live Progress Tracking
As you advance through dialogue:- Previously visited entries turn blue
- The current entry turns green
- When dialogue finishes, the last entry stays blue
- If dialogue is canceled, the last entry turns red
Debugging Tips
Use the debugger to verify dialogue flow
Use the debugger to verify dialogue flow
Run through your dialogue and watch the highlighting to ensure it follows the expected path:
Check for disconnected branches
Check for disconnected branches
Look for isolated nodes or groups of nodes with no incoming connections. These indicate unreachable dialogue.
Verify option connections
Verify option connections
Ensure each option has an outgoing arrow. Missing arrows mean you forgot to set the option’s goto:
Use the graph to plan complex branching
Use the graph to plan complex branching
Before writing code, sketch your dialogue flow on paper, then use the debugger to verify it matches your design.
Test edge cases
Test edge cases
Use the debugger to ensure all branches can reach the end, or that infinite loops behave as intended.
Debugger API
The DialogueEngine automatically communicates with the debugger when active:Deregistering from Debugger
If you want to hide a DialogueEngine from the debugger:Deregistering prevents the debugger from displaying or updating this DialogueEngine instance.
Limitations
- The debugger only works in editor debug builds, not in exported games
- Very large dialogue trees (1000+ entries) may slow down the graph rendering
- The debugger shows the structure but doesn’t execute code - use
print()statements to debug logic
Common Debugging Scenarios
”My dialogue gets stuck”
- Check the debugger for the red (canceled) node
- Look for:
- Missing option gotos
- Invalid goto IDs
- Conditions that always return the same value
”Some dialogue never appears”
- Look for disconnected nodes in the graph
- Verify all branches have gotos pointing to them
- Check branch IDs match between entries and gotos
”Dialogue jumps to the wrong place”
- Follow the arrows in the graph
- Verify goto IDs point to the correct entries
- Check that you’re not confusing entry IDs with option IDs
Next Steps
- Review branching dialogue to understand gotos and branches
- Check player choices for debugging options and conditions
- Use save/load with entry IDs shown in the debugger
