Fix a Bug Without Breaking Things
Find every affected code path and the same bug elsewhere before landing the minimal fix.
Intermediate1 min read
Customize
Fill these in and the prompt below updates as you type. Anything you leave blank stays as a placeholder.
Your prompt
4 placeholders leftI have a bug: {{bug_description}} Expected behavior: {{expected}} Actual behavior: {{actual}} Here's the relevant code: {{code}} Before suggesting a fix: - Identify all code paths affected. - Check if the fix could break any existing functionality. - Look for other places in the code with the same pattern (they might have the same bug). Then provide: the minimal fix (smallest change that solves the problem), an explanation of why it works, a test case that proves the bug is fixed, and a test case that proves existing functionality still works.