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.
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:
Copy
It's broken, fix it
Try:
Copy
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".
If Leap struggles fixing the issue even after providing a strong bug report, it can be a good idea to add additional logging.Example:
Copy
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.
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.