Termide 0.44.0: Debugging that sets itself up

Termide 0.44.0 release poster

Added

  • Debugger settings. [debug] in config.toml says how each debugger starts, globally or for one project: [debug.debuggers.<name>] gives its program (command, a custom LLVM’s lldb-dap, a dlv outside PATH, the Python debugpy needs) and the flags it gets in every launch (args, in place of its defaults, before a launch’s own debugger_args); native orders the debuggers a Rust file tries without a command, and console is where an adapter runs the program by default. Delve’s --only-same-user=false in Termux is now the default args of dlv-dap there, shown and replaceable rather than fixed in code. The settings window has a Debug tab for all of it, a page per debugger.
  • The debugger’s own flags. debugger_args = ["--log", "--log-output=dap"] in a debug command of commands.toml adds flags to the debugger itself, where it reads its options: after an adapter’s own arguments, before --/--args for lldb and gdb, before the subcommand for Delve, before pdb’s -c. The Set up debugging form has a field for them. Until now the only way was a wrapper script under the debugger’s name.
  • Rust debugs without a command. F5 on a Rust file in a Cargo project offers its binaries, found with cargo metadata: the one whose main file it is, or else those of its package, or else every binary of the workspace. Each is built with cargo build -p <package> --bin <name> first and runs from the workspace root under lldb-dap, GDB’s adapter or lldb in a terminal, whichever is installed. Without any of them, or without Delve for a Go file, a window says what to install, where Go used to start a dlv that was not there. The agent’s debug tool starts Rust files the same way.
  • Set up debugging… in the editor’s [≡] menu and the command palette opens a form for a launch: its name, the program and its arguments, the build to run first and the debugger, filled in for the file in the editor. Run saves it as a debug command in the project’s .termide/commands.toml and starts it. F5 opens the same form when there is nothing to launch, where it used to do nothing visible.

Changed

  • Messages between agents read as steps, all under &. Another agent’s message — a panel’s answer, question or note, a background task’s answer, the task a delegate panel was given — showed on the plate of the user’s own messages, headed › & default · reply, and read as the user’s words or a final answer. It is now a step like a tool call, its text folded under it: & Receiving reply from default (panel 3) · …, & Receiving question from …, & Receiving note from …, & Taking task from …. A message sent reads by its kind too, & Asking panel 3 · …, & Replying to panel 1 · …, & Telling panel 3 · …, and agents is & Listing agent panels: &, a task’s glyph, now opens every exchange with another agent, where send_message and agents had @, the reasoning block’s glyph.

Fixed

  • Library files open in the project’s language server. A file of the standard library, where the debugger stops, or of a dependency in ~/.cargo/registry, where go-to-definition leads, got a rust-analyzer of its own: for the standard library it failed on nightly manifests, built build scripts inside the toolchain and ran cargo check there, keeping the spinner going and the CPU busy. Such files — Rust’s rustlib/src, ~/.cargo/registry and ~/.cargo/git, Go’s GOROOT and pkg/mod — now open in the server of the project last opened for the language, which has them loaded.
  • A debug build no longer waits for rust-analyzer. rust-analyzer checked and built its build scripts in the project’s target/, holding the lock a cargo build for the debugger needs; it now gets target/rust-analyzer (cargo.targetDir = true). Its artifacts are built twice in exchange, once after the update.
  • Go debugs in Termux. Delve accepts a local connection only from the user who started it, and on Linux it checks that by reading /proc/net/tcp, which Android 10 and later deny to apps; it then closed termide’s connection with “closing connection from different user” and the session ended (go-delve/delve#3202). Where that file cannot be read, termide now starts dlv dap with --only-same-user=false, so the wrapper script that added the flag is no longer needed; elsewhere the check stays on.
  • Status messages reach the journal. What termide reported in the status line — a failed preview switch, a cleared set of breakpoints, a panel’s notice — was kept for a status bar that no longer draws it, so nobody saw it; it is now written to the journal too, errors as warnings.
  • A debug session that fails to start says why. An adapter that went away before the launch left only “the debug adapter exited” in the panel and nothing in the log, even when it had hung up on termide while still running. The failure now says whether the adapter exited, and with what status, or only closed the connection, and ends with the last line it printed: for Delve in Termux, whose same-user check cannot read /proc/net/tcp on Android, that is closing connection from different user. What the adapter prints until the program is launched goes to the log at info, and termide waits for its last lines before it reports the failure. A failed build names its last line in the same way, and the log records when a session ends, stops, or the program exits with its code.
  • Agents no longer question a panel nothing was asked in yet. An agent looking for whoever made the uncommitted changes asked every panel agents listed, a fresh one too, which started a session there only to answer that it knew nothing. agents now marks such a panel free (nothing asked yet) and says its agent knows nothing of the work so far, and send_message refuses a question to it; info still goes.
  • An LSP server opens on a page of its own, like an AI connection. + Add Server or a server in the LSP tab of the settings opens its page: language, command, arguments and root markers as ordinary fields, saved as they are edited, then Back to list and Delete server; Esc or Backspace goes back too. The form it replaces kept the list’s rows under it for the mouse, so a click on a field could open another server or the add row, and it showed a line of key hints. A server added and left without a command is dropped on the way back.
  • Long lines in the debug panel’s output wrap. They were cut at the panel’s edge, which hid the end of an adapter’s error, usually the part that says why.
  • The outline fills in for a restored layout. At startup, on a switch of project or when a parked project came back, the outline stayed empty until the editor was edited, refocused or reopened: nothing passed it the restored editor’s text, and the live sync waits for an edit. It is now filled from the active editor at once, and when it has to pick an editor itself it takes the active one rather than the first in the layout.
  • A click on the agent banner’s list selects a session rather than opening it. A single click on a recent session opened it at once in place of the fresh one. The first click now moves the list’s cursor there; a click on the session already selected, or a double click, opens it.
  • Picking a launch from the debug list starts it. When F5 or Start debugging offered several launches — a debug command and the Python, Go or Rust file in the editor — the one chosen from the list did nothing.