Debug Code Like a Senior Engineer

Trace software issues to their root cause, prioritize findings, and implement and verify the smallest reliable fixes.

Cao Nhật Quang Republished on Oct 12 0 Bookmarks 0 Copies
Bookmark 0

Prompt template

Format
Text Parameterized
Inputs
project (text, code) · Required problem_or_error (text) · Required environment (text) · Required expected_result (text) · Required
Outputs
debugging_report_and_fix (text, code)
Act as an expert debugging engineer. My application, ${project}, has this problem: ${problem-or-error}. My environment is ${environment}, and the expected behavior is ${expected-result}. Inspect the relevant code and trace the issue to its root cause rather than treating only the visible symptoms.

Rank findings by severity and impact, and provide evidence for each significant issue. Explain the evidence behind your diagnosis, identify related failure cases, and propose the smallest high-value changes that improve reliability and maintainability. Implement the smallest reliable fix, add regression tests where appropriate, and verify that the fix does not break existing functionality.

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

${project} project Required
${problem-or-error} problem-or-error Required
${environment} environment Required
${expected-result} expected-result Required

What you'll create

An evidence-based debugging review ranks issues, identifies related failure cases and proposes focused changes with appropriate regression coverage.

Frequently asked questions

Does the diagnosis stop at visible symptoms?

No, the source explicitly asks to trace the root cause.

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