Programming Difficulty: Intermediate

Professional Code Issue Diagnosis and Resolution Template

This prompt guides an experienced software developer to analyze the provided code snippet, identify any issues or bugs, and generate clear, actionable solutions to fix them. It instructs to deliver a detailed diagnostic report outlining the problems and step-by-step corrections. The prompt is reusable for any code snippet input and ensures the output is structured for immediate application.

The prompt

67 words1 blank to fill in

Act as an experienced software developer with expertise in debugging and code optimization. Based on the provided code snippet [CODE SNIPPET], placeholder, analyze the code to identify all issues, bugs, or inefficiencies. Generate a detailed diagnostic report that explains each problem clearly and provides step-by-step instructions to fix them. Include recommendations for best practices and potential improvements. Present the output as a structured report suitable for immediate implementation.

Highlighted text is a blank. Swap it for your own detail before you send the prompt.

What it produces

  • Identified a null pointer exception in line 23 due to uninitialized variable. Fix by initializing the variable before use.
  • Detected inefficient loop causing performance bottleneck. Optimize by replacing with a more efficient algorithm.
  • Found syntax error in function declaration. Correct the syntax to match language standards.

How to use this prompt

Four steps, about a minute. Nothing to install and no account needed.

  1. Copy the prompt

    Use the Copy button above. The whole prompt goes to your clipboard exactly as written. Nothing is trimmed.

  2. Fill in the blanks

    Replace [CODE SNIPPET] with your own detail. Everything in square brackets is a blank for you to fill in.

  3. Paste it into your assistant

    Checked against ChatGPT, Claude, Gemini. It is written as plain instructions, so paste it into whichever of them you already use.

  4. Read the result, then push back

    Compare what you get to the example below. If it is close but not right, say what to change: shorter, warmer, more specific, then ask again in the same conversation.

More prompts like this one

Close neighbours in Programming, by shared subject and tagging.

Share Professional Code Issue Diagnosis and Resolution Template:

Reviews and questions

What other people got out of this prompt, and what they asked about it.

No reviews yet

Be the first to share how this prompt worked for you.