Debug and predict
Axiom debugs Rust (lldb-dap), C# (netcoredbg) and Python (debugpy) through the Debug Adapter Protocol. Install the adapter yourself; see setup.
Start
- Set breakpoints: click the gutter or press F9 on a line.
- Rust and C#: build first (Ctrl+Shift+B). The executable becomes a target. Python: open the file to run.
- Open the Debug panel (Ctrl+Shift+D), check the Target and press F5.
While paused: F5 continue, F10 step over, F11 step into, Shift+F11 step out, F6 pause, Shift+F5 stop. Open Locals to see variables; watch expressions run only when you press Evaluate.
Evaluating a watch runs code in your program and can change it. Opening a value marked "opening runs code" calls a getter.
Predictions
When the program pauses, Axiom predicts the next few statements of the current function from the source and the values the debugger reported. Nothing runs to make a prediction.
- Notes in the editor say predicted (for example
predicted: c = 16), and a branch that will not run is struck through. - The prediction stops at the first thing it does not model (a call, a loop), and says why.
- For Python and C#, open Locals first: listing their values can run program code, so Axiom waits until you do.
- Turn it off with Predict next steps in the Debug panel, or per language in
settings.tomlunder[prediction].
Details and the subset each language models: predictive debugging.
Ask AI about the paused program
AI: Explain Debugger State, AI: Explain Prediction and AI: Suggest Fix from Debugger (AI menu or command palette) send the paused state to your AI provider, but only after a separate permission that names where it goes (AI: Allow Sharing Debugger State…). The request labels what was observed and what Axiom predicted; answers must mark their own guesses as hypotheses. Resuming makes an answer out of date, and the chat says so. AI: Stop Sharing Debugger State withdraws the permission.