Skip to main content

Debugging

Axiom debugs Rust, C# and Python programs through the Debug Adapter Protocol (DAP). You install the adapter; Axiom starts it only when you start debugging, and only in a trusted folder.

LanguageAdapter (licence)What is debuggedSet up
Rustlldb-dap from LLVM 18 or newer (Apache-2.0 with LLVM exception); lldb-dap-<version> names are found tooAn executable a Cargo build reportedInstall LLDB from your system packages (apt install lldb-18) or llvm.org
C#netcoredbg (MIT)An assembly a dotnet build reportedDownload a release and put netcoredbg on PATH
Pythondebugpy (MIT), run by the project's chosen interpreterThe active .py filepython -m pip install debugpy in the environment you chose

Using it​

  • Breakpoints: click the editor's gutter or press F9. A filled dot is set; a hollow one is one the adapter could not place (hover the debug panel for its reason).
  • Start: pick a target in the debug panel (Ctrl+Shift+D) and press F5. Build a Rust or .NET project first: its executables become targets.
  • While paused: F5 continue, F10 step over, F11 step into, Shift+F11 step out, F6 pause, Shift+F5 stop. The editor shows the paused line; the panel shows the call stack (paged), variables and the debug console.
  • Variables are fetched when you open a scope or value. Scopes the adapter marks as slow say so, and values marked lazy ("opening runs code") call a getter when opened.
  • Watch expressions are evaluated only when you press Evaluate. Evaluating runs code in the program and can change its state.
Source and running code can differ

At launch Axiom records a hash of the project's source files and, for a built program, when it was built. If the paused file has unsaved edits, changed since launch, or changed after the build, the panel says so: the lines shown may not be the code that runs.

How it works​

  • ide-debug is a UI-free crate. It frames messages with the shared bounded reader (header and body limits), validates every message, and runs one session's state machine: starting, launching, configuring, running, paused, stopping, ended or failed. Events may arrive before responses; late, unknown and duplicate answers are ignored.
  • Suspend generations: every stop and every resume starts a new generation. Frames, scopes, variables and watch results belong to one generation; answers for an older one are dropped, and the view is cleared when the program resumes.
  • Bounded: queues in each direction, inspection requests waiting at once, frames per page and in all, variables per value, opened values, watches, breakpoints per file and console lines all have limits. A request that gets no answer in time fails on its own; one during start-up fails the session.
  • Nothing the adapter asks is run. Axiom does not offer runInTerminal or startDebugging; if an adapter sends them anyway, they are refused.
  • Ending: stop asks terminate (when supported), then disconnect with the program, then kills the adapter's process tree after a grace period. Revoking trust or opening another folder kills it at once.
  • Providers decide the adapter. LaunchPlan carries the adapter's argv, its adapterID and its own launch arguments, so the core and the panel have no adapter-specific code.
  • Snapshots: Ide::debug_snapshot gives a read-only copy of a stop: frames and the values already fetched, each with where it came from (generation, thread, frame, scope, path) and whether it was read without running program code. Watch results are never in it. Predictive debugging and the AI tools use only this.
  • Locals are listed when you open them. The one exception is prediction: when the debug provider says listing locals runs no program code (LaunchPlan::locals_without_side_effects, true for lldb-dap only), the core lists the paused frame's locals itself.

Limits​

  • One session at a time. Attaching to a running process is refused.
  • No conditional breakpoints, logpoints, function or data breakpoints, exception filter choice, memory views, disassembly or hot reload.
  • Sources an adapter reports without a file path (generated code) are listed but cannot be opened.
  • Python debugs one file with the chosen interpreter; module launch (-m) and arguments are not configurable yet.