Sign In

@algiras/debugium

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@algiras/debugium

AI-driven debugger for Python, JavaScript, TypeScript, Rust, Java, C/C++, Scala, and WebAssembly via DAP adapters and MCP tools.

latest
Source
npmnpm
Version
0.1.3
Version published
Weekly downloads
74
100%
Maintainers
1
Weekly downloads
 
Created
Source

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 cache.py with variables panel showing key, self, and value

Features

  • Real-time web UI — source viewer, breakpoints, variables (recursive expansion), call stack, console, timeline, watch expressions, findings
  • 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
  • MCP integration — 50+ tools exposing the full debug session to Claude or any LLM
  • Comprehensive DAP coverage — 35 DAP requests implemented including breakpoints, stepping, goto, memory, disassembly, and more
  • Capability-gated tools — MCP tools automatically shown/hidden based on what the debug adapter supports
  • Multi-session — debug multiple programs simultaneously, with child session routing (js-debug)
  • Execution timeline — every stop recorded with changed variables and stack summary
  • Watch expressions — evaluated automatically at every breakpoint
  • Annotations & findings — LLM (or you) pin notes to source lines and record conclusions
  • Breakpoints — conditional, logpoints, hit-count, function, data (watchpoints), exception, run-to-cursor
  • Keyboard shortcuts — F5 continue, F10 step over, F11 step in, Shift+F11 step out
  • Dark / light mode toggle
  • Variable search filter with recursive expansion
  • Thread selector — switch between threads in multi-threaded programs
  • Panel collapse — resize or hide any panel (Slim / Standard / Full layouts)
  • Auto-reconnect — UI reconnects to the server after a dropped WebSocket
  • Session export/import — save and restore debugging knowledge across sessions

Install

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

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

macOS / Linux binary

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

From source

# Prerequisites: Rust stable + wasm-pack
cargo install wasm-pack

# Build UI
wasm-pack build crates/debugium-ui --target web --out-dir pkg
cp 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 server
cargo install --path crates/debugium-server

Usage

Debug a Python file

debugium launch my_script.py --adapter python

Debug a Node.js / TypeScript file

debugium launch app.js --adapter node
debugium launch app.ts --adapter typescript

Debug C / C++ / Rust

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

# Rust
cargo build && debugium launch target/debug/my_binary --adapter lldb

Debug Java / Scala

# Java (requires microsoft/java-debug adapter)
debugium launch MainClass --adapter java

# Scala (connect to a running Metals DAP server)
debugium launch build-target --adapter metals
debugium launch build-target --adapter metals:5005  # custom port

Use a custom adapter via dap.json

# 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

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):

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

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

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

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

Breakpoints

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

Execution control

debugium continue                  # resume execution
debugium step over                 # step over (next line)
debugium step in                   # step into a function call
debugium step out                  # step out of current function

UI annotations (visible in the web UI)

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

Example workflow

# Terminal A — start the session
debugium launch tests/target_python.py --adapter python \
  --breakpoint "$(pwd)/tests/target_python.py:43"

# Terminal B (or LLM agent) — inspect and drive it
debugium sessions
debugium stack
debugium vars
debugium eval "len(fibs)"
debugium bp set tests/target_python.py:49
debugium continue                  # runs to line 49
debugium vars
debugium step over
debugium context --json            # machine-readable snapshot
debugium annotate tests/target_python.py:43 "called here" --color info
debugium finding "fibs has 10 elements" --level info
debugium bp clear

MCP Tools

When connected via MCP, 50+ 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, 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, 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 (Axum)
├── DAP proxy — spawns / connects to debug adapters (debugpy, js-debug, lldb-dap, java-debug, Metals, custom)
├── HTTP API  — /state, /dap, /sessions, /annotations, /findings
├── WebSocket — broadcasts DAP events to the UI in real-time
└── MCP stdio — JSON-RPC 2.0 server for LLM tool integration

debugium-ui (Leptos + WASM)
├── CodeMirror 6 — source viewer with breakpoint gutters + exec arrow + LLM annotations
├── Reactive panels — Variables, Stack, Breakpoints, Findings, Watch, Timeline, Console
└── WebSocket client — receives events, sends DAP commands, auto-reconnects

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):

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

License

MIT

Keywords

claude-plugin

FAQs

Package last updated on 04 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts