Errors will inevitably happen when building software, whether the code is written by an AI or a human. When working with Leap, the key is not to panic or waste credits by repeatedly pasting the same error. Instead, use a systematic debugging approach. Leap works best when you provide clear context and precise, focused instructions. This guide explains how to debug issues effectively, collaborate with Leap, and unblock yourself when things don’t go as expected.

1) Provide Detailed Bug Reports

When you encounter an issue, the fastest way to get to a fix is by writing a strong bug report. Just like when working with a developer, the more context you share, the easier it is for Leap to understand what went wrong and how to fix it. A strong bug report typically includes:
  • A clear description of the problem
  • Steps to reproduce the issue
  • What you expected to happen
  • What actually happened
  • Any relevant logs, screenshots, or error messages
Tip: The quality of your prompt directly shapes the quality of the fix. Avoid vague requests and include the exact error, a minimal snippet, and what you tried. Instead of:
It's broken, fix it
Try:
When I click the "Save" button on the form, nothing happens.  
Expected: The form should save and show a success message.  
Actual: No response, and the following error appears in the console: "TypeError: handleSubmit is not defined".

2) Add relevant logs

If Leap struggles fixing the issue even after providing a strong bug report, it can be a good idea to add additional logging. Example:
When I submit the form, I get the error "TypeError: handleSubmit is not defined".  
Please add relevant console.log statements around the submit handler so I can gather more details.
After running the updated code, check the Logs panel in Leap or your browser’s Console. Share the new output in your next bug report so Leap can refine the fix.

3) Use Iterative Debugging

Big issues are often solved step by step. Instead of asking Leap to “fix everything,” try breaking down the problem:
  • Ask Leap to identify why the error is happening
  • Add logging or test cases if the cause is unclear
  • Apply the suggested fix and retest
  • Share updated results with Leap
By iterating, you avoid burning credits on large, unfocused requests and make steady progress toward a solution.

4) Ask a human for help

If you’ve tried the steps above and are still stuck, don’t hesitate to reach out for human help. You can ask a teammate or developer friend, or drop a message in our Discord community.