Promptles
Debugging & Error Handling

Minimal Reproduction

intermediate

Definition

The smallest possible example that still triggers the bug. Stripping away unrelated code makes the problem easier to spot and faster to fix. If a bug only shows up in a 10,000-line app, creating a 20-line version that reproduces it is incredibly valuable.

In the wild

Your full app crashes when saving a profile. A minimal reproduction might be: 'Create a file with just the saveProfile function and call it with an empty object. It throws TypeError on line 5.' Now the bug is isolated and obvious.

More from Debugging & Error Handling