Skip to main content

top-coder-ai-skills-debugger

Shared debugger library for Top Coder AI Skills. Python library for AI-driven debugging of Node.js (CDP) and Python (DAP) programs — breakpoints, stepping, and variable inspection without a GUI.

Features

  • Node.js — CDP over WebSocket (built-in inspector, no extra npm deps).
  • Python — DAP via debugpy (launch and attach).
  • Single API — DebugSession: start, breakpoints, continue, step, evaluate, stack, variables.
  • Two modes — In-memory (e.g. MCP server) or file-backed with a daemon (e.g. CLI scripts that run as separate processes).
  • LLM-friendly — All methods return plain text suitable for agent consumption.

Install

pip install top-coder-ai-skills-debugger
# or
uv add top-coder-ai-skills-debugger
# or
poetry add top-coder-ai-skills-debugger

Requirements: Python ≥3.11.

Quick start (in-memory)

import asyncio
from debugger_core.session import DebugSession

async def main():
    session = DebugSession()
    print(await session.start("app.js", "node"))
    print(await session.add_breakpoint("app.js", 10))
    print(await session.resume())       # run until breakpoint
    print(await session.inspect("x"))    # evaluate expression
    print(await session.get_stack())
    print(await session.stop())

asyncio.run(main())

All methods return strings (status messages, stack traces, variable dumps, or error text).

Session modes

Mode Use case How
In-memory MCP server, scripts in one process session = DebugSession() then start, resume, etc.
File-backed CLI scripts (each command is a new process) session = DebugSession.from_file_or_new(language="node"). First call runs start() and spawns a daemon; later calls reuse it via the saved session file.

For file-backed usage, always call stop() when done so the daemon and debuggee are torn down.

API overview

Method Description
start(program, language) Launch the debugger (language: "node" or "python").
add_breakpoint(file, line) Set a breakpoint; returns verification status.
resume() Continue until next breakpoint or program exit.
step(action="next") Step over (next) or step in (step_in).
inspect(expression) Evaluate an expression in the current frame.
get_stack() Current call stack as formatted text.
get_local_variables() Local variables of the top frame.
probe(program, file, line, language) One-shot: start, run to line, return stack + variables, then stop.
stop() Disconnect and clean up.

Development

From the package directory:

# Build wheel + sdist
make build

# Publish to PyPI (after configuring auth)
make publish

# Clean and reinstall from dist (sanity check)
make clean && make test-install

See the repo root and docs/PUBLISHING.md for workspace setup and publishing from the monorepo.

License

MIT. See the top-level repo for full license and source links.

Metadata

Release files for top-coder-ai-skills-debugger 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for top-coder-ai-skills-debugger 0.1.0
File Size Uploaded Provenance
top_coder_ai_skills_debugger-0.1.0.tar.gz 23.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for top-coder-ai-skills-debugger 0.1.0
File Interpreter ABI Platform
top_coder_ai_skills_debugger-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 50.7 kB

Release files / top_coder_ai_skills_debugger-0.1.0.tar.gz

Download URL top_coder_ai_skills_debugger-0.1.0.tar.gz
Size 23.2 kB
Tags Source
SHA-256 checksum
How to use checksums
375ed90ab891d24b092767da8cc1df8323a480c275d7b438b8c8a381df0a6c34
BLAKE2b-256 checksum
How to use checksums
1079b1b02ca42bb2c55c54a0764db02a2abb43cedb543e810dffaafd7e374f5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.13

Release files / top_coder_ai_skills_debugger-0.1.0-py3-none-any.whl

Download URL top_coder_ai_skills_debugger-0.1.0-py3-none-any.whl
Size 27.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ae6f4dad2cdb8c712f00b18074927387e2efffe12573982b7ebd39e995cd65a
BLAKE2b-256 checksum
How to use checksums
a843c85749ba36923c64215e9cf64173d70927c8d6c3bf64121f094414a4f169
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.13

Security for top-coder-ai-skills-debugger 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page