Skip to content
SYCH-TECH
Prompts/Development/GitHub Copilot bug-fix and test-generation prompt
AI Prompt Library

GitHub Copilot bug-fix and test-generation prompt

Give Copilot enough structure to reproduce a bug, propose a fix, and generate useful tests rather than speculative code.

Recommended tools

GitHub CopilotCursorClaude CodeChatGPT

Prompt

Debug this issue. Bug: {bug_description}. Reproduction steps: {repro_steps}. Expected behavior: {expected_behavior}. Likely affected files: {affected_files}. Test framework: {test_framework}. First summarize the likely root cause, then propose the smallest safe fix, then add focused regression tests. Call out uncertainty explicitly if the repro is incomplete.

What this prompt does

  • Asks for repro summary, root-cause hypotheses, and a minimal fix.
  • Requests regression tests in the stated {test_framework}.
  • Forces explicit uncertainty when evidence is incomplete.

Tips for this prompt

  • Paste exact {repro_steps} — partial repro causes speculative fixes.
  • Mention {affected_files} if you already know where the bug lives.
  • Reject fixes that change unrelated behavior.

How to use the prompt

  • Fill in {bug_description}, {repro_steps}, {expected_behavior}, {affected_files}, and {test_framework}.
  • Ask for root cause before code if the bug is non-trivial.
  • Run the suggested tests locally before merging.
debuggingcopilottestsbug fixai dev{bug_description}{repro_steps}{expected_behavior}{affected_files}{test_framework}

Related prompts

Use this prompt with your workflow, then explore Sych-Tech apps for real product examples.

View products