Skip to content
AthasDocs
Download

Run and Debug

Start a debug session, step through your program, and read threads, call stack, variables, watches and breakpoints.

Updated

On this page

Athas debugs through the Debug Adapter Protocol, the same protocol VS Code uses, so an adapter you already have installed works here too.

Open it

Run View: Show Run and Debug from the command palette, or pick Run and Debug in the View menu. The view opens as a tab beside the editor.

Launch configurations

Athas reads .vscode/launch.json from the project, including comments and trailing commas. It also offers generated configurations for what it finds in the project, so a simple program needs no file at all.

Pick a configuration from the view's picker, then start the session.

Commands

CommandDefault
Debug: StartF5 inside the view
Debug: StopShift+F5
Debug: RestartCmd/Ctrl+Shift+F5
Debug: Toggle Breakpoint—

Inside the view, F6 pauses, F10 steps over, F11 steps into and Shift+F11 steps out.

Debug: Toggle Breakpoint works on the editor's cursor line, so it is worth binding in keymaps. Breakpoints are shared across the session and the editor gutter.

While a session runs

The view lists the program's threads and, for the selected one, its call stack. Selecting a frame opens that file at the line. Below it are the frame's variables, the watch expressions you add, every breakpoint in the project, and the adapter's console.

Adapters

Athas finds the adapter from the configuration's type. These are recognised:

typeAdapterWhere it comes from
python, debugpydebugpypython -m pip install debugpy
go, delveDelvego install github.com/go-delve/delve/cmd/dlv@latest
lldb, rust, codelldb, lldb-dapCodeLLDB, or lldb-dapA CodeLLDB install, or the LLVM toolchain
gdbGDBGDB 14 or newer on PATH
cppdbgGDB or lldb-dapFollows MIMode
node, pwa-node, chrome, pwa-chrome, msedge, pwa-msedgejs-debugjs-debug-adapter on PATH, or ATHAS_JS_DEBUG pointing at its dapDebugServer.js

Athas also looks through ~/.vscode/extensions for an adapter you installed there.

Java is the exception: it starts through the Java language server, so open a Java file and let jdtls come up first.

For anything else, set adapterCommand or debugServer in launch.json and Athas will use it.

The adapter is not found

The error names what is missing and how to install it. If the adapter is installed somewhere unusual, point at it directly with adapterCommand in the configuration rather than relying on discovery.