Debugium

io.github.Algiras由 GitHub 账号 Algiras 发布v1.0.0更新于 Oct 24, 2026

AI-driven live debugger with MCP bridge for Python, JS, TS, Rust, Java, C/C++

已验证STDIO仅桌面开发者工具AI 与机器学习

概览

AI 生成的概览

Debugium 是一款多语言实时调试器,带网页界面,并通过 MCP 桥接把调试会话开放给 AI 助手进行单步、检查和问题分析。

可以做什么
  • 定位与检查:一次获取完整调试上下文、调用栈、作用域、变量、线程、源码和控制台输出
  • 设置与清除断点、日志点、函数断点、异常断点和数据断点
  • 控制执行:继续、单步进入/跳过/跳出、暂停、跳转、重启、终止、断开连接
  • 求值与修改变量表达式,读写内存,反汇编本机代码
  • 查看历史:时间线、变量历史、快照对比、首次变化定位
  • 在源码行添加注释与结论、管理监视表达式,以及启动、附加、导出和导入会话
适用场景
适合让助手直接排查正在运行的程序,而不是只凭源码猜测:复现缺陷、单步跟踪失败的测试、观察变量何时变化,或附加到远程的 debugpy、JDWP、Node inspector 进程。
运行要求
以本地进程方式运行(npm 包或安装的二进制),仅限桌面端,支持 macOS 与 Linux。需要 debugium 服务已启动并有活动会话,以及目标语言的调试适配器:Python 用 debugpy,Node/TypeScript 用 js-debug,C/C++/Rust/WASM 用 lldb-dap,Java 用 java-debug,Scala 用 Metals,或自定义 dap.json。未声明认证或环境变量。
安装前请注意
部分工具会改变程序状态:set_variable、set_expression、write_memory、goto 和 restart_frame 会修改执行流程或内存,断点、单步以及停止/终止会话也会影响被调试进程。附加到远程主机会向该机器发送调试流量。会话日志和端口文件会写入用户主目录。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Debugium,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Debugium

A multi-language debugger with a real-time web UI and LLM integration via MCP.

Debug Python, JavaScript, TypeScript, C, C++, Rust, Java, Scala, and WebAssembly programs from your browser — with AI-driven analysis through the Model Context Protocol.

[CI] [Docs]

[Debugium UI — paused at a breakpoint in target_python.py with variables, call stack, breakpoints, watch, timeline, and console panels]


Features

Web UI

  • Real-time web UI — source viewer, breakpoints, variables (recursive expansion), call stack, console, timeline, watch expressions, findings — all updated live via WebSocket
  • Multi-tab source viewer — open multiple files, click stack frames to navigate
  • Variable search — filter variables by name with recursive expansion
  • Changed-variable highlighting — variables that changed since last stop shown in orange
  • Thread selector — switch between threads in multi-threaded programs
  • Panel collapse & resize — drag to resize, toggle to collapse; Slim / Standard / Full layout presets
  • Dark / light mode toggle
  • Auto-reconnect — UI reconnects after a dropped WebSocket, with visual status indicator
  • Keyboard shortcuts — F5 continue, F10 step over, F11 step in, Shift+F11 step out, Ctrl/Cmd+D dark mode
  • Button animations — in-flight spinner and completion flash for debug commands

Debugging

  • Multi-language — Python (debugpy), Node.js/TypeScript (js-debug), C/C++/Rust (lldb-dap), Java (java-debug), Scala (Metals), WebAssembly (lldb-dap), or any DAP adapter via dap.json
  • Comprehensive DAP coverage — 35+ DAP requests: breakpoints, stepping, goto, memory read/write, disassembly, and more
  • Breakpoints — conditional, logpoints, hit-count, function, data (watchpoints), exception, run-to-cursor (continue_until)
  • Multi-session — debug multiple programs simultaneously, with child session routing (js-debug)
  • Remote debugging — attach to debugpy, JDWP, or Node inspector running on another machine or container

LLM / MCP Integration

  • 64 MCP tools — the full debug session exposed to Claude or any LLM
  • Capability-gated tools — tools automatically shown/hidden based on adapter capabilities
  • Compound tools — get_debug_context (orient in one call), step_until, step_until_change, run_until_exception, explain_exception, get_call_tree, compare_snapshots, find_first_change
  • Execution timeline — every stop recorded with changed variables and stack summary
  • Watch expressions — evaluated automatically at every breakpoint, manageable by LLM or UI
  • Annotations & findings — pin notes to source lines, record conclusions visible in the UI
  • Session export/import — save and restore debugging knowledge across sessions

CLI Control

  • Full CLI — 13 subcommands to drive sessions from a second terminal without the web UI
  • Auto-discovery — port file at ~/.debugium/port, session logs in ~/.debugium/sessions/

Install

Claude Code Plugin (recommended)

/plugin marketplace add Algiras/debugium/plugin install debugium@debugium

Then add to your project's .mcp.json (see MCP Tools below).

macOS / Linux binary

bash
curl -fsSL https://raw.githubusercontent.com/Algiras/debugium/main/install.sh | bash

From source

bash
# Prerequisites: Rust stable + wasm-packcargo install wasm-pack
# Build UIwasm-pack build crates/debugium-ui --target web --out-dir pkgcp crates/debugium-ui/pkg/cm_init.js         crates/debugium-ui/dist/pkg/cp crates/debugium-ui/pkg/debugium_ui.js      crates/debugium-ui/dist/pkg/cp crates/debugium-ui/pkg/debugium_ui_bg.wasm crates/debugium-ui/dist/pkg/
# Build & install servercargo install --path crates/debugium-server

Usage

Debug a Python file

bash
debugium launch my_script.py --adapter python

Debug a Node.js / TypeScript file

bash
debugium launch app.js --adapter nodedebugium launch app.ts --adapter typescript

Debug C / C++ / Rust

bash
# C or C++ (compile with -g for debug info)cc -g -O0 main.c -o main && debugium launch ./main --adapter lldbc++ -g -O0 main.cpp -o main && debugium launch ./main --adapter lldb
# Rustcargo build && debugium launch target/debug/my_binary --adapter lldb

Debug Java / Scala

bash
# Java (requires microsoft/java-debug adapter)debugium launch MainClass --adapter java
# Scala (connect to a running Metals DAP server)debugium launch build-target --adapter metalsdebugium launch build-target --adapter metals:5005  # custom port

Attach to a running process (remote debugging)

bash
# Python (debugpy listening on port 5678)debugium attach --port 5678 --adapter python
# Java (JDWP on port 5005)debugium attach --port 5005 --adapter java
# Node.js (inspector on port 9229)debugium attach --port 9229 --adapter node

Or via MCP: attach_session(port=5678, adapter="python", breakpoints=["/path/app.py:42"])

Use a custom adapter via dap.json

bash
# Create a dap.json (see dap.json.example) then:debugium launch my_program --config ./dap.json
# Or place dap.json in cwd / .debugium/ for auto-discovery:debugium launch my_program   # finds ./dap.json automatically

Set initial breakpoints

bash
debugium launch my_script.py --adapter python \  --breakpoint /abs/path/my_script.py:42 \  --breakpoint /abs/path/helpers.py:15

Enable LLM / MCP integration

Add a .mcp.json to your project root (Claude Code picks this up automatically):

json
{  "mcpServers": {    "debugium": {      "command": "debugium",      "args": ["mcp"]    }  }}

Then launch the session normally — the MCP server connects to whichever port is active:

bash
debugium launch my_script.py --adapter python --breakpoint /abs/path/my_script.py:42

Claude Code will now have access to all Debugium MCP tools. See CLAUDE.md for the recommended workflow and SKILL.md for the full tool reference.


CLI Control Commands

Once a session is running (debugium launch …), you can drive it from a second terminal — or from an LLM agent — without touching the web UI.

Port is auto-discovered from ~/.debugium/port; override with --port.

Global flags (all subcommands)

FlagDefaultDescription
--port PORT~/.debugium/portServer port to connect to
--session IDdefaultSession to target
--jsonoffPrint raw JSON instead of human-readable output

Inspection

bash
debugium sessions                  # list active sessionsdebugium threads                   # list threadsdebugium stack                     # show call stackdebugium vars                      # show local variables (auto-resolves top frame)debugium vars --frame-id 2         # show variables for a specific framedebugium eval "len(fibs)"          # evaluate expression in top framedebugium eval "x + 1" --frame-id 2debugium source path/to/file.py    # print full source filedebugium source path/to/file.py --line 43  # windowed ±10 lines with → markerdebugium context                   # full snapshot: paused-at, stack, locals, source, breakpointsdebugium context --compact         # same but truncated (3 frames, 10 vars)

Breakpoints

bash
debugium bp set FILE:LINE [FILE:LINE …]   # set breakpoints (replaces existing in that file)debugium bp list                          # list all breakpointsdebugium bp clear                         # clear all breakpoints

Execution control

bash
debugium continue                  # resume executiondebugium step over                 # step over (next line)debugium step in                   # step into a function calldebugium step out                  # step out of current function

UI annotations (visible in the web UI)

bash
debugium annotate FILE:LINE "message" [--color info|warning|error]debugium finding "message"         [--level  info|warning|error]

Example workflow

bash
# Terminal A — start the sessiondebugium launch tests/target_python.py --adapter python \  --breakpoint "$(pwd)/tests/target_python.py:43"
# Terminal B (or LLM agent) — inspect and drive itdebugium sessionsdebugium stackdebugium varsdebugium eval "len(fibs)"debugium bp set tests/target_python.py:49debugium continue                  # runs to line 49debugium varsdebugium step overdebugium context --json            # machine-readable snapshotdebugium annotate tests/target_python.py:43 "called here" --color infodebugium finding "fibs has 10 elements" --level infodebugium bp clear

MCP Tools

When connected via MCP, 64 tools are available. Key ones:

CategoryTools
Orientget_debug_context ★ (paused location + locals + stack + source in one call)
Breakpointsset_breakpoint, set_breakpoints, set_logpoint, list_breakpoints, clear_breakpoints, set_function_breakpoints, set_exception_breakpoints, set_data_breakpoint, list_data_breakpoints, clear_data_breakpoints, breakpoint_locations
Executioncontinue_execution, step_over, step_in, step_out, pause, goto, disconnect, terminate, restart
Inspectionget_stack_trace, get_scopes, get_variables, evaluate, get_threads, get_source, get_capabilities, loaded_sources, source_by_reference, step_in_targets
Mutationset_variable, set_expression
Outputget_console_output, wait_for_output (with from_line to avoid stale matches)
Memoryread_memory, write_memory, disassemble (native debugging)
Historyget_timeline, get_variable_history, compare_snapshots, find_first_change
Annotationsannotate, get_annotations, add_finding, get_findings
Watchesadd_watch, remove_watch, get_watches
Compoundstep_until, step_until_change, continue_until, run_until_exception, explain_exception, get_call_tree, restart_frame
Sessionget_sessions, list_sessions, launch_session, attach_session, stop_session, export_session, import_session
Controlgoto_targets, cancel_request

Note: step_over, step_in, and step_out are blocking — they wait for the adapter to pause before returning. Safe to chain back-to-back without sleeps. continue_execution returns console_line_count for use with wait_for_output. Tools like read_memory, goto, and restart_frame only appear when the adapter supports them.

See SKILL.md for the full reference with input schemas.


Keyboard Shortcuts

KeyAction
F5Continue
F10Step Over
F11Step Into
Shift+F11Step Out
Ctrl/⌘+DToggle dark/light mode

Architecture

debugium-server (Rust + Axum)├── DAP proxy     — spawns / attaches to debug adapters (debugpy, js-debug, lldb-dap, java-debug, Metals, custom)├── HTTP API      — /state, /sessions, /annotations, /findings, /watches, /timeline├── WebSocket     — broadcasts DAP events + enriched stop data (changed vars, timeline) to UI├── MCP stdio     — JSON-RPC 2.0 server exposing 64 tools for LLM integration├── CLI control   — 13 subcommands to drive sessions from a second terminal└── ~/.debugium/  — port file, session logs (events.ndjson), debug log
debugium-ui (Leptos + WASM)├── CodeMirror 6  — source viewer with breakpoint gutters, exec arrow, LLM annotations, multi-tab├── Reactive panels — Variables, Stack, Breakpoints, Findings, Watch, Timeline, Console (18 components)└── WebSocket     — receives events, sends DAP commands, auto-reconnects with status indicator

Supported Languages & Adapters

Language--adapter flagPrerequisiteVerified
Pythonpython / debugpypip install debugpy✅
Node.jsnode / jsjs-debug (bundled or build from vscode-js-debug)✅
TypeScripttypescript / ts / tsxjs-debug + tsx or ts-node in PATH✅
C / C++lldb / codelldblldb-dap (Xcode on macOS; apt install lldb on Linux)✅
Rustlldb / rustlldb-dap + cargo build✅
Javajava / jvmmicrosoft/java-debug adapter JAR✅
Scalametals / scalaRunning Metals DAP server⚠️ (requires running Metals)
WebAssemblywasmlldb-dap (LLVM ≥16)⚠️ (requires WASM-aware LLVM)
Any DAP adapter--config dap.jsonSee dap.json.example✅

Remote debugging

Connect to a DAP server running on another machine (or in a container):

json
{  "adapterId": "debugpy",  "request": "attach",  "host": "192.168.1.100",  "port": 5678,  "pathMappings": [{ "localRoot": ".", "remoteRoot": "/app" }]}
bash
debugium launch app.py --config remote.json

License

MIT

来源:README.md,提交 e1fc50d

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。