Troubleshoot with prompts
Use prompts to debug apps like a builder - identify bugs, prevent breakage, and fix with clarity.
Why debugging with prompts works
A good prompt doesn’t just build - it can help you break down, inspect, and repair what’s already there. When something doesn’t look right, doesn’t work, or disappears altogether, Rocket can help you debug step by step.
- How to describe bugs and expected behavior clearly.
- How to prompt for analysis before applying changes.
- How to fix fragile parts of the app without making it worse.
- How to use Rocket for performance review and root cause analysis.
- Sample flows to debug like a pro by prompt.
Start with: What’s broken?
Describe what isn’t working, what should be happening, and where.
Describe the symptom, the expected behavior, and the context (what screen, what triggered it).
Get to the root: Ask why, not just what
Once you’ve named the issue, shift your prompt toward the why.
Use prompts like “check,” “review,” or “why” to get deeper context before fixing.
Debugging fragile logic
When working on critical logic (like auth or payment flows), you can tell Rocket to proceed cautiously.
Prompt pattern:
Use caution prompts to set the right “mindset” for Rocket when working in fragile areas.
Audit the system: Architecture and code health
When your project grows or feels messy, prompt Rocket for a codebase audit.
Rocket can return a prioritized list like:
- Split data-fetching from UI in
<ScreenName>
. - Move utility functions from
App.tsx
toutils/
. - Separate form logic from visual layout in
FormComponent
.
Rocket can audit by section too - just say “check the form flow” or “review state handling.”
Handle performance bottlenecks
When things feel slow or sluggish, ask Rocket to diagnose performance issues.
Rocket might suggest:
- Memoize
<TaskItem>
to reduce re-renders. - Lazy load large charts.
- Optimize image sizes on homepage.
- Cache the result of fetch calls with React Query.
Fix by reducing, not rewriting
When debugging, avoid “start over” prompts. Ask Rocket to make smaller, progressive changes.
The more you isolate the change, the safer and more accurate the fix.
Examples for debug flows:
1. Broken login redirect
Broken login redirect debugging
2. Invisible component
Invisible component debugging
Root cause, not symptom
Don’t settle for “it’s fixed.” Ask Rocket:
- Why did that happen in the first place?
- Could this same issue show up in other places?
- Should we change the structure to prevent this kind of bug?
Strong debugging is less about patching and more about understanding.
Final thoughts
Debugging with prompts helps you:
- Think like a builder, not a firefighter.
- Guide Rocket through logic, not just outputs.
- Prevent bugs before they multiply.
- Turn breakdowns into learning moments.