npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mchiver/debug-server-local

v0.1.1

Published

Gives LLMs debugging powers.

Readme

debug-server-local

Headless, file-path-based debug runtime.

Given an absolute file_path (or inline content), a language, and a set of process env vars, debug-server-local runs the code under a debugger and exposes every introspection/control primitive over HTTP, MCP, and a programmatic API.

What it knows about

  • Languages (to pick the V8 Inspector for node-family, DAP for python/others).
  • A user-supplied env_vars map and path_prepend array used to configure each spawned child process.

What it does NOT know about

  • Workspaces, persistent file storage, tar uploads.
  • Engine installation or version registries.
  • Any dashboard UI.

For those concerns, see the debug-server-remote project, which embeds debug-server-local as a library and wraps it with a workspace + runtime engine layer.

Run

npm install
npm start            # standalone HTTP server on :4200
npm run mcp          # MCP stdio server
npm test

Programmatic API

const { create_router, create_app, SessionManager } = require( '@mchiver/debug-server-local' );
  • create_router( options ) returns an Express Router so a host app can mount it.
  • create_app( options ) returns a full Express app + WebSocket server for standalone use.
  • SessionManager is exported directly for callers that need to do their own translation before delegating into the debug runtime.

API Reference

Session Lifecycle

| Description | HTTP Endpoint | MCP Tool | Programmatic API | |---|---|---|---| | Create a new debug session | POST /api/sessions | create_session | SessionManager.create( options ) | | List all active sessions | GET /api/sessions | list_sessions | SessionManager.list() | | Get a single session | GET /api/sessions/:id | get_session | SessionManager.get( id ) | | Kill a session | DELETE /api/sessions/:id | kill_session | SessionManager.destroy( id ) | | Restart a session | POST /api/sessions/:id/restart | restart_session | SessionManager.restart( id ) | | Read stdout/stderr lines | GET /api/sessions/:id/output | read_output | DebugSession.read_output( offset, limit ) | | Write to stdin | POST /api/sessions/:id/input | send_input | DebugSession.send_input( data ) | | Update session settings | POST /api/sessions/:id/settings | update_settings | DebugSession.break_on_first_line = ... |

Debug Control

| Description | HTTP Endpoint | MCP Tool | Programmatic API | |---|---|---|---| | Resume execution | POST /api/sessions/:id/debug/resume | debug_resume | DebugSession.debug_resume() | | Step over current line | POST /api/sessions/:id/debug/step_over | debug_step_over | DebugSession.debug_step_over() | | Step into function call | POST /api/sessions/:id/debug/step_into | debug_step_into | DebugSession.debug_step_into() | | Step out of function | POST /api/sessions/:id/debug/step_out | debug_step_out | DebugSession.debug_step_out() | | Get call stack | GET /api/sessions/:id/debug/stack | get_call_stack | DebugSession.get_call_stack() | | Get source code and breakpoints | GET /api/sessions/:id/source | get_source | DebugSession.get_source() | | Get protocol traffic logs | GET /api/sessions/:id/logs | get_logs | DebugSession.get_logs( offset, limit ) | | Get variables in scope | GET /api/sessions/:id/debug/variables | get_variables | DebugSession.get_variables( frame_index, scope_type ) | | Evaluate expression | POST /api/sessions/:id/debug/evaluate | evaluate | DebugSession.evaluate( expression, frame_index ) | | Set a breakpoint | POST /api/sessions/:id/debug/breakpoint | set_breakpoint | DebugSession.set_breakpoint( url, line_number, column_number ) | | Remove a breakpoint | DELETE /api/sessions/:id/debug/breakpoint/:breakpoint_id | remove_breakpoint | DebugSession.remove_breakpoint( breakpoint_id ) | | Configure exception pause | POST /api/sessions/:id/debug/exception-pause | set_exception_pause | DebugSession.set_exception_pause( state ) |

LLM Primitives

| Description | HTTP Endpoint | MCP Tool | Programmatic API | |---|---|---|---| | Stateless run-and-report | POST /api/triage | run_and_report | SessionManager.triage( options ) | | Set a non-pausing logpoint | POST /api/sessions/:id/debug/logpoint | set_logpoint | DebugSession.set_logpoint( url, line_number, expression ) | | Get logpoint traces | GET /api/sessions/:id/traces | get_traces | DebugSession.get_traces( offset, limit ) | | Clear logpoint traces | DELETE /api/sessions/:id/traces | clear_traces | DebugSession.clear_traces() | | Snapshot variables as checkpoint | POST /api/sessions/:id/debug/checkpoint | take_checkpoint | DebugSession.take_checkpoint( name, frame_index, scope_type ) | | List checkpoints | GET /api/sessions/:id/debug/checkpoints | list_checkpoints | DebugSession.list_checkpoints() | | Diff two checkpoints | GET /api/sessions/:id/debug/checkpoint_diff | compare_checkpoints | DebugSession.compare_checkpoints( before, after ) |

WebSocket Events

Events are broadcast to all connected WebSocket clients.

| Event Name | When Sent | Description | |---|---|---| | session_list | On client connect | Snapshot of all active sessions. | | session_created | After a session is created | Includes the new session info. | | session_updated | On any state change (excl. pause/resume) | Includes the updated session info. | | session_exited | After a session is destroyed | { session_id } | | debugger_paused | When execution hits a pause | { session_id, callFrames, reason } | | debugger_resumed | When execution resumes | { session_id } | | output_update | When new stdout/stderr is captured | { session_id, lines } |