Skip to main content

🪲 Debug Mode

An expert problem solver specializing in systematic troubleshooting and diagnostics.

Overview

Debug mode acts as an expert problem solver, specializing in systematic troubleshooting and diagnostics. It is designed to help users track down bugs, diagnose errors, and resolve complex issues across various tech stacks. This mode employs a methodical approach of analyzing, narrowing possibilities, adding logs, and confirming fixes, ensuring efficient and effective problem resolution. It has full access to tools for reading, editing, executing commands, and leveraging external documentation.

Primary Use Cases

  • Identifying the root cause of application errors and crashes.
  • Troubleshooting API endpoints, event processing, and data flow issues.
  • Diagnosing performance bottlenecks and memory leaks.
  • Debugging complex workflows and datasource integrations.
  • Analyzing logs and telemetry data to pinpoint problems.
  • Providing step-by-step guidance for resolving specific bugs.
  • Verifying fixes and ensuring system stability after changes.

Example Prompts

"My API is returning a 500 error, can you help me debug it?"
"Why is this workflow not triggering as expected?"
"I'm seeing a memory leak in my Node.js application, how can I find it?"
"Analyze this stack trace and tell me what's going wrong."
"Add logging to this function to help me understand its execution flow."
"My database connection is failing, what should I check?"

Internal Capabilities / Agents

  • Error Diagnoser: Analyzes error messages, stack traces, and logs to identify potential causes.
  • Code Inspector: Examines code for common pitfalls, logical errors, and anti-patterns.
  • Logging Injector: Inserts temporary logging statements to trace execution flow and variable states.
  • Test Case Generator (for Debugging): Creates minimal test cases to reproduce and isolate bugs.
  • System Interrogator: Uses command-line tools to inspect system state, network connections, and process information.
  • Documentation Retriever: Fetches relevant debugging tips, common solutions, and troubleshooting guides from documentation.

Model Behavior & Tool Access

CapabilityStatus
Read files
Write files
Execute commands
Evaluate code
Use external documentation
Manage learning flow

Preferred Models:

  • Gemini 1.5 Pro / Claude 3 Opus (Complex diagnostics, deep code analysis, and multi-step troubleshooting)
  • Gemini 2.5 Flash / Claude 3 Sonnet (Routine bug fixes, log analysis, and guided debugging)

Scope

✅ In Scope

  • Systematic identification and resolution of software bugs.
  • Diagnosing issues in framework components (events, workflows, datasources, plugins).
  • Analyzing logs, error messages, and system behavior.
  • Suggesting and implementing temporary fixes or workarounds.
  • Guiding users through debugging processes.
  • Verifying bug fixes through testing or observation.

❌ Out of Scope

  • High-level architectural redesigns (use Architect mode).
  • Comprehensive feature implementation (use Code mode).
  • Providing theoretical explanations without a specific debugging context (use Ask mode).
  • Long-term project management or CI/CD pipeline setup (use DevOps mode).
  • Formal code reviews (use Code Review mode).

Embedded Behaviors

  • Follows a structured debugging methodology: observe, hypothesize, test, fix, verify.
  • Prioritizes non-invasive diagnostic steps before suggesting code modifications.
  • Can add temporary logging or print statements to aid in debugging.
  • Leverages documentation for debugging guides and common solutions.
  • Provides clear explanations for diagnostic commands and proposed fixes.

Workflow Integration

  • Directly interacts with source code files to add debugging statements or apply fixes.
  • Executes commands to run tests, inspect processes, or analyze system state.
  • Can generate minimal reproducible examples in tests/ directory.
  • Leverages:
    • External documentation for troubleshooting.
    • CLI for project-specific debugging commands.

Safety Features

  • Seeks explicit confirmation before applying significant code changes or fixes.
  • Ensures all commands are run within a secure and monitored environment.
  • Focuses on targeted modifications to minimize unintended side effects.
  • Prioritizes temporary debugging aids over permanent changes unless confirmed.

Shortcut to Activate

Mac: ⌘ + .  
Windows/Linux: Ctrl + .
  • /code: For implementing the final, verified fixes after diagnosis.
  • /ask: For understanding underlying concepts related to the bug.
  • /architect: For re-evaluating design decisions that might have led to the bug.
  • /devops: For issues related to deployment, environment, or infrastructure.

Author Notes

Debug mode is an indispensable tool for maintaining the health and stability of software projects. It empowers developers to efficiently pinpoint and resolve issues, ensuring that applications run smoothly and reliably.