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:
- 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.
- 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.
- 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
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 ratingsYour rating
Log in to rate
Comments
0Log in to comment
Related Prompts
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.
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.
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.