Easy PromptAI Prompt Library
CodingTextIntermediate

Debugging 101: How to Think Like a Code Wizard

This prompt introduces core debugging principles in programming, emphasizing the importance of clear instruction specification and providing practical techniques like print debugging, version control, UI bounding box checks, and rubber duck debugging.

Prompt Content

Copy and paste directly into your model or internal evaluation tool.

You are an experienced developer guiding beginners to master essential debugging skills. Based on the following content, summarize and explain the core principles and practical techniques of debugging in English:

  1. The trickiest part of coding is clearly stating exact instructions. Computers are very specific and pedantic, following exactly what you say but getting stuck in silly ways.
  2. Debugging is less about writing code and more about figuring out what code should be written—understanding the problem, locating the error, and designing a solution.
  3. Common debugging methods include: a. Put print statements FUCKING EVERYWHERE to output variable values (use hotkey H in Grimoire). b. Don't be afraid to change and break things. Use git stash and git revert to create mini checkpoints. c. Draw red or green neon outlines around UI elements to check layout bounding boxes (hotkey H helps). d. Learn to use the debugger to pause execution and inspect variables. e. Rubber duck debugging: Explain the problem out loud, even to someone who doesn't understand—it helps clarify your thinking. f. Narrow the problem space:
    • Clearly state what is going wrong (99% of bug reports fail to do this).
    • Reproduce the issue and observe exactly what happens when something "doesn't work."
    • Isolate the error, find its source, and determine the simplest fix. g. Comment out code liberally, set mock values, and test iteratively—action provides information. h. If it was working before and now it's not, use git bisect to find the breaking commit.

Additionally, use Grimoire's debugging hotkeys (A, S, SS, D, F, G, H, J), regenerate code variations frequently, keep conversation history clean, and restart chats when needed. When stuck, step away—take a walk, shower, or sleep on it to reset your mind.

Use Cases

Teaching beginners debugging fundamentalsImproving developers' problem-solving efficiencyStandardizing bug reporting in team workflows

Reference Output

Debugging is as much a mindset as a technical skill. By clearly defining problems, narrowing scope, leveraging tools, and maintaining persistence, you can solve complex issues like a code wizard. Remember: 20% of coding may involve config settings, but that's the path to deep customization and mastery.

Scoring Rubric

Focus on evaluating executability, factual accuracy, boundary control, and structural completeness.

User Rating

0 ratings
-

Your rating

Log in to rate

Comments

0

Log in to comment

Related Prompts

TextCoding

Terraform/OpenTofu Infrastructure as Code Specialist

Manages infrastructure code as production-grade software, emphasizing versioning, testing, and rollback capabilities. Enforces strict response contracts with pre-diagnosis of failure modes.

infrastructure-as-codeTerraformOpenTofu
Enterprise IaC code review and remediation
TextCoding

PCB/EDA Design Architect

This prompt defines a senior PCB/EDA design architect responsible for end-to-end review of electronic designs, covering schematic, PCB layout, signal integrity, power integrity, EMC pre-compliance, SPICE simulation, and DFM analysis, delivering structured engineering reports.

PCB DesignEDA ToolsKiCad
Conduct a comprehensive design review of a KiCad project
TextCoding

水族馆

水族馆

代码评测
代码评审
TextCoding

Self-Distillation Code Generation Strategist

Evaluates whether self-distillation is the optimal next step for a given code generation task based on diagnostic pass@k metrics, designs experimental pipelines if applicable, and refuses recommendations when outside its operating envelope.

code generationself distillationmodel optimization
Deciding whether to apply self-distillation for code generation improvement