Fix a bug
If the error can be reproduced, use Debug as your main mode: it checks hypotheses against real execution, variable values, and the call stack.
In Debug mode the agent sets breakpoints and checks the hypothesis against values at run time.
- Attach the stack trace, the failing test, or the reproduction steps.
- Ask the agent to reproduce the problem using an existing IDE run configuration. Do not start by changing code.
- Ask it to set a breakpoint before the point of divergence and check the values, the control flow, and the call stack. If the error is on a library boundary, the agent can read the dependency's code.
- Once the cause is confirmed, ask for the minimal fix. Limit the scope with an Edit Scope and do not allow the failing test to be changed if it specifies the correct behavior.
- Run the same scenario again, then the related tests. A fix counts as verified when the original error no longer reproduces and the neighboring checks pass.
- Review the diff in Agent Changes and, if needed, follow the reviewing the agent's changes route.
Example prompt:
Reproduce the failure of this test in Debug mode. Set a breakpoint before the
place where the actual value diverges from the expected one, and check the
hypothesis against the variable values and the call stack. Do not change code
until the cause is confirmed. Then make the minimal fix and rerun the test.
If you cannot reproduce the problem, or the agent stops with an error, look up the symptom in the solutions catalog.