Using AI in UDB¶
You can ask the AI questions directly from a UDB session. This is useful when you prefer driving the debugger yourself and only occasionally want to hand off to the AI for a specific question, instead of running an AI agent as the main interface to your investigation. See How it works for a short description of what UDB is doing behind the scenes when you use this mode.
ai [question]¶
Ask the given question about the program you are currently debugging.
If question is omitted, UDB prompts you to type a multi-line question. Finish with a
line containing just end, or with Control-D.
While the AI agent is working, UDB prints its progress, the tools it is calling and any intermediate output. When the AI agent has finished, UDB prints its final answer and returns to the UDB prompt.
If you run ai again in the same UDB session, the previous conversation is resumed so that you can ask follow-up questions in context.
Examples:
start 1> ai why did this program crash?
⌛ Thinking…
start 1> ai where did foo's value come from?
⌛ Thinking…
Added in version 10.0.
config ai agent¶
Select which AI agent Undo uses to answer ai queries. The selection is remembered across UDB sessions.
As each agent needs specific integration, only Claude Code is supported.
Added in version 10.0.