Questions tagged [debugging]
Post a PromptPrompts that help diagnose and fix bugs.
4 prompts
39votes
3answers
4.0kviews
Hypothesis-driven debugging prompt that stops the model guess-fixing
Classic failure mode: I paste a bug and the model immediately rewrites five things, half unrelated, and says "this should fix it." No hypothesis, no evidence, just vibes. When one of those changes acc
16votes
2answers
2.7kviews
Structured root-cause prompt that turns a stack trace into a ranked fix list
When I paste a raw stack trace, models tend to fixate on the deepest frame and suggest a fix right there, even when the real cause is three frames up where a bad value was created. The topmost error i
22votes
1answers
2.2kviews
Debugging an intermittent asyncio race the model kept papering over
Had a flaky test that failed maybe 1 in 30 runs. Every model I tried "fixed" it by adding an await asyncio.sleep(0.1) somewhere, which is not a fix, it is a bribe. The real bug was two coroutines muta
27votes
1answers
3.5kviews
Self-verification step that catches an agent's own hallucinated file paths and APIs
My coding agent kept confidently importing functions that don't exist and referencing files it never opened. The plan looked great, the code didn't run. Classic. What moved the needle was a mandatory