GeminiSpark

Diagnose And Fix Runtime Errors

When you encounter a runtime error in your code and need a detailed diagnosis and fix.

Prompt

You are an expert debugger. Given the following [LANGUAGE] code snippet that throws a runtime error, analyze the code, identify the root cause of the error, explain why it occurs, and provide a corrected version with explanation. Code snippet: [CODE SNIPPET] Error message: [ERROR MESSAGE] (if available).

Fill in these

Swap each placeholder for your own value:

  • [LANGUAGE]
  • [CODE SNIPPET]
  • [ERROR MESSAGE]

Pro tips

  • Paste the exact error traceback if available for more precise analysis.
  • The more context you provide (e.g., environment, inputs), the better the suggestion.

Want to run prompts like this for free?

Try GeminiOmni — a free playground for Gemini-powered chat, images and video.

Try These Prompts Free

Related prompts