top of page

Debugging Advice

Identifying and Resolving Runtime Errors in Code

This prompt helps engineering teams systematically debug and resolve runtime errors in their codebase. It focuses on identifying the root cause, analyzing error messages, and applying best practices to resolve issues while improving code robustness.

Responsible:

Engineering/IT

Accountable, Informed or Consulted:

Engineering

THE PREP

Creating effective prompts involves tailoring them with detailed, relevant information and uploading documents that provide the best context. Prompts act as a framework to guide the response, but specificity and customization ensure the most accurate and helpful results. Use these prep tips to get the most out of this prompt:

  • Share error messages, stack traces, or logs from the runtime environment.

  • Provide relevant portions of the codebase or a description of the feature where the error occurs.

  • Identify recent changes or updates that may have introduced the error.

THE PROMPT

Provide detailed debugging advice for resolving runtime errors in the [specific programming language] codebase used in [specific application]. Focus on:

  • Error Diagnosis: Analyze the provided error messages and stack traces to identify the root cause. For example, pinpoint null reference errors, type mismatches, or missing dependencies.

  • Debugging Tools: Recommend tools like debuggers (e.g., PyCharm Debugger, GDB, Chrome DevTools) or logging frameworks (e.g., Log4j, Winston) to trace code execution and identify problematic areas.

  • Reproducing the Error: Suggest techniques for reliably reproducing the error in a controlled environment to ensure consistent debugging.

  • Resolution Strategies: Provide step-by-step solutions for addressing the issue, such as updating library versions, correcting data flow issues, or adjusting configuration settings.

  • Prevention and Testing: Recommend ways to prevent similar errors in the future, such as adding test cases, improving exception handling, or incorporating type checking.

If additional context about the error or code structure is needed, ask clarifying questions to provide targeted debugging guidance.

Bonus Add-On Prompts

Propose methods for debugging intermittent runtime errors that are difficult to reproduce.

Suggest techniques for tracing and resolving memory access violations in [specific programming language].

Highlight strategies for implementing more informative logging to simplify future debugging efforts.

Use AI responsibly by verifying its outputs, as it may occasionally generate inaccurate or incomplete information. Treat AI as a tool to support your decision-making, ensuring human oversight and professional judgment for critical or sensitive use cases.

SUGGESTIONS TO IMPROVE

  • Focus on debugging errors specific to particular frameworks, such as React, Django, or Spring.

  • Include tips for debugging in different environments, such as production versus development.

  • Propose ways to automate error detection using tools like Sentry or Bugsnag.

  • Highlight techniques for debugging multi-threaded applications to address concurrency issues.

  • Add suggestions for documenting resolved errors to create a knowledge base for future reference.

WHEN TO USE

  • To resolve runtime errors blocking development or deployment.

  • During code reviews to address known or potential issues.

  • When analyzing error logs from production systems.

WHEN NOT TO USE

  • For errors caused by external systems beyond the codebase’s control.

  • If the error is purely theoretical without observable behavior or logs.

Fractional Executives

© 2025 MINDPOP Group

Terms and Conditions 

Thanks for subscribing to the newsletter!!

  • Facebook
  • LinkedIn
bottom of page