Debug a Production Code Issue

Trace a production bug to its root cause, explain the failure, and provide robust, production-ready code.

Artificial Intelligence | AI Tools | AI Prompts Republished on Oct 20 0 Bookmarks 0 Copies
Bookmark 0

Prompt template

Format
Text Parameterized
Inputs
code_and_bug_details (code, text) · Required
Outputs
debugging_analysis_and_fix (text, code)
Think like a senior debugging engineer investigating a production bug. Analyze the code carefully and think step by step to find the root cause and propose robust solutions.

Explain:
- What the code does
- What the problem is
- Why it fails
- Relevant edge cases

Then provide fixed, production-ready code.

Code and bug details:
${code-and-bug-details}

Replace the ${…} placeholders with your values before using this prompt. See parameters and defaults below

Parameters

Replace each placeholder with your own value, or use its default when one is provided

${code-and-bug-details} code-and-bug-details Required

What you'll create

A debugging analysis explains the current code, the failure and its underlying cause. It considers relevant edge cases before proposing robust fixes and revised code.

Frequently asked questions

Does the response explain why the failure occurs?

Yes, the explanation separates what the code does, what is wrong and why it fails.

Comments

Tried this prompt? Share what you made, compare results, or ask a question

Up to 4 results. Images up to 2 MB; MP4, WebM, or MOV videos up to 4 MB each