View enhanced debug output from the running Godot project with error highlighting and filtering.
View formatted debug output from your running Godot project with error highlighting, stack trace parsing, and smart filtering. Use when you need to diagnose runtime errors or monitor game behavior in real-time.
/plugin marketplace add Zate/cc-godot/plugin install gd@godot-gamedevView enhanced debug output from the running Godot project with error highlighting and filtering.
Check if project is running
Parse and enhance the output:
Display formatted output:
Present errors with the following enhanced format:
[ERROR] <error_message>
Location: <file_path>:<line_number>
Function: <function_name>
Details: <additional_context>
Stack Trace:
at <function> (<file>:<line>)
at <function> (<file>:<line>)
[WARNING] <warning_message>
Location: <file_path>:<line_number>
Context: <relevant_context>
[INFO] <message>
Pattern: Attempt to call function .* in base 'null instance'
Response:
[ERROR] Null Reference Error
Trying to call a method on a null object
Quick Fixes:
- Check if the object exists before calling methods
- Verify @onready node paths are correct
- Ensure nodes aren't freed before being accessed
Example fix:
if my_node != null:
my_node.some_method()
Pattern: Node not found: .* or get_node: .*not found
Response:
[ERROR] Node Not Found
Path: <node_path>
Possible Causes:
- Node doesn't exist in the scene tree
- Incorrect node path (check capitalization)
- Node hasn't been added yet (timing issue)
Quick Fixes:
- Use get_node_or_null() to check if node exists
- Verify the node path in the scene tree
- Use @onready for scene tree references
Pattern: Index .* out of range
Response:
[ERROR] Array Index Out of Bounds
Index: <index_value>
Array Size: <size>
Quick Fixes:
- Check array size before accessing: if index < array.size()
- Use range-based loops instead of index access
- Validate index is not negative
Pattern: Invalid operands .* and .* in operator
Response:
[ERROR] Type Mismatch
Cannot perform operation between incompatible types
Quick Fixes:
- Ensure variables are initialized
- Check for null values before operations
- Verify type annotations match actual types
Pattern: Signal .* already connected or Attempt to call an invalid function
Response:
[ERROR] Signal Connection Error
Quick Fixes:
- Check if signal is already connected before connecting
- Verify method signature matches signal parameters
- Ensure method exists and is spelled correctly
Example:
[ERROR] (x5) Null instance access
First occurred at: 14:32:15
Last occurred at: 14:32:23
See details with: /gd:debug --expand=<error_id>
Ask user if they want to filter output:
Question: "Would you like to filter the debug output?" Header: "Filter" Multi-select: false Options:
For each error, provide:
Example output:
─────────────────────────────────────
[ERROR] Invalid get index 'health' (on base: 'null instance')
Location: res://scripts/player.gd:45
Function: take_damage()
Likely Cause:
The player node is null when trying to access the 'health' property.
This usually happens when:
- A node reference (@onready var) points to a non-existent node
- The node was freed/removed before this code runs
- The node path is incorrect
Suggested Fix:
# Add null check before accessing:
if player != null:
player.health -= damage
# Or verify node exists in _ready():
func _ready():
assert(player != null, "Player node not found!")
Related Code (player.gd:45):
45 | func take_damage(amount):
46 | player.health -= amount # ERROR HERE
47 | update_health_bar()
Next Steps:
1. Check that the player node exists in the scene tree
2. Verify the node path for @onready variables
3. Add null checks before accessing node properties
─────────────────────────────────────
Offer to enable watch mode:
"Would you like to enable watch mode? This will continuously monitor for new errors."
If yes:
Example watch mode output:
[WATCH MODE] Monitoring debug output... (Press Ctrl+C to stop)
14:35:12 | [INFO] Game started
14:35:15 | [WARNING] Texture not found: res://sprites/missing.png
14:35:18 | [ERROR] Null instance access in enemy.gd:23
Press Enter to see error details, or type 'stop' to exit...
After showing debug output, offer helpful commands:
Debug output retrieved.
Helpful commands:
/gd:debug --errors-only Show only errors
/gd:debug --watch Enable watch mode
/gd:restart Restart the game
Need help fixing an error? Just ask! The godot-debugging skill can help interpret and fix these errors.
After displaying errors, automatically activate the godot-debugging skill to provide:
Debug Output (Last 50 lines)
═══════════════════════════════════════
[INFO] Project initialized
[INFO] Scene loaded: res://scenes/main.tscn
[WARNING] Node has been removed from scene: Label
Location: res://scenes/ui/menu.tscn
Context: Attempting to access removed node
Note: This usually happens when you call queue_free() on a node
and then try to access it later in the same frame.
─────────────────────────────────────
[ERROR] Attempt to call function 'move_and_slide' in base 'null instance' on a null instance
Location: res://scripts/player.gd:67
Function: _physics_process(delta)
Stack Trace:
at CharacterBody2D._physics_process (res://scripts/player.gd:67)
at Node._propagate_process (core)
🔍 Analysis:
The player node (CharacterBody2D) is trying to call move_and_slide()
but the instance is null. This typically means:
- The player was freed but physics_process is still running
- The script is on a freed node
💡 Suggested Fix:
func _physics_process(delta):
if not is_instance_valid(self):
return
velocity.y += gravity * delta
move_and_slide()
─────────────────────────────────────
Summary:
• Total Messages: 24
• Errors: 3 (🔴)
• Warnings: 5 (🟡)
• Info: 16 (🔵)
Most Recent Error:
res://scripts/player.gd:67 - Null instance in _physics_process
═══════════════════════════════════════
Would you like me to help fix any of these errors?
Keep track of errors across debug sessions:
Example:
[ERROR] (Recurring) Null instance access
This error has occurred 3 times in the last hour
Previously seen: 14:15, 14:22, 14:35
Note: This might indicate a deeper issue with your code structure.
Consider adding more robust null checks or restructuring your node references.
Parse debug output intelligently
Color coding (if terminal supports it)
Smart filtering
Quick actions
After displaying the enhanced debug output, remind the user: "💡 Tip: I can help fix these errors! Just ask about any specific error and I'll provide a detailed explanation and fix using the godot-debugging skill."