adapter-development

Build and maintain Python, JavaScript, and Java AIDB debug adapters.

19|2|Updated Dec 1, 2025
One-click install
npx skills add https://github.com/ai-debugger-inc/aidb --skill adapter-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: adapter-development
Source: https://github.com/ai-debugger-inc/aidb/tree/main/.claude/skills/adapter-development
Command: npx skills add https://github.com/ai-debugger-inc/aidb --skill adapter-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured guide to building and maintaining AIDB debug adapters. It covers a component-based architecture, lifecycle hooks, port management, launch orchestration, resource cleanup, and language-specific patterns for Python, JavaScript, and Java adapters.

Core Features & Use Cases

  • Component-Based Architecture: Understand the modular layout (ProcessManager, PortManager, LaunchOrchestrator, etc.) and how adapters delegate work.
  • Language Patterns: Access language-specific adapter patterns for Python (debugpy), JavaScript (vscode-js-debug), and Java (java-debug).
  • Lifecycle & Resources: Hooks, port lifecycle, and cleanup strategies to keep adapters reliable.

Quick Start

Start by reviewing the language-specific patterns (resources/python-adapter-patterns.md, resources/javascript-adapter-patterns.md, resources/java-adapter-patterns.md) and then create or update an adapter following the documented patterns.

Frequently Asked Questions about adapter-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a debug adapter for Python, JavaScript, or Java?

Build debug adapters using a component-based architecture with ProcessManager, PortManager, LaunchOrchestrator, and TargetResolver. Follow language-specific patterns for debugpy (Python), vscode-js-debug (JavaScript), and java-debug (Java) to handle launching, breakpoints, and source path resolution across local and remote scenarios.

What's the best way to structure a language-agnostic debug adapter?

Use modular base components (ProcessManager, PortManager, LaunchOrchestrator, TargetResolver, SourcePathResolver, LifecycleHooks) with environment hooks and resource cleanup. This framework delegates responsibilities cleanly, scales across languages, and handles port lifecycle and process management consistently.

How do I handle port and process management in a debug adapter?

Implement PortManager for allocation and LifecycleHooks for cleanup to prevent port conflicts and orphaned processes. The adapter orchestrates launch sequences via LaunchOrchestrator while maintaining process state, enabling reliable local and remote debugging.

Can I use the same adapter patterns across Python, JavaScript, and Java?

Yes. The component-based framework provides reusable patterns for each language (debugpy, vscode-js-debug, java-debug), but language-specific configurations and hooks adapt behavior for each runtime's debugging protocol, breakpoint handling, and source path requirements.

What happens if breakpoints or source paths fail to resolve in my adapter?

SourcePathResolver validates and maps file paths; TargetResolver identifies debug targets. If resolution fails, check environment validation, launch configuration, and per-language path mapping rules. The documented patterns include troubleshooting for each supported language.

Do I need to handle environment setup before launching a debug adapter?

Yes. Use environment hooks and validation checks to verify runtime availability, paths, and dependencies before LaunchOrchestrator starts the debugger. Proper setup prevents launch failures and ensures breakpoints and source paths resolve correctly across local and remote targets.