dap-protocol-guide
БесплатноБез исполняемых скриптовНе проверенComprehensive guide for working with Debug Adapter Protocol in AIDB
Об этом скилле
DAP Protocol Guide for AIDB
This skill provides comprehensive guidance for working with the Debug Adapter Protocol (DAP) in AIDB. Use this when implementing features that interact with debug adapters, analyzing DAP message flows, or troubleshooting protocol-level issues.
Overview
The Debug Adapter Protocol (DAP) is a standardized protocol for communication between development tools and debug adapters. AIDB provides a fully-typed, authoritative implementation in src/aidb/dap/protocol/.
For system-wide DAP architecture, see docs/developer-guide/overview.md which includes:
- Complete data flow diagrams
- DAP client layer details
- Integration with adapters and session management
Key Principles
- Always use existing protocol types - Don't create dictionaries manually
- Follow established patterns - Check adapter implementations before creating new request sequences
- Handle errors properly - DAP has specific error response patterns
- Respect initialization sequence - Initialize → Launch/Attach → ConfigurationDone
- Consider language differences - Python, JavaScript, and Java adapters have different behaviors
Authoritative Source
src/aidb/dap/protocol/ is THE authoritative reference for all DAP types and messages.
This package contains:
types.py- DAP data types (Breakpoint, StackFrame, Variable, etc.)requests.py- All request message classesresponses.py- All response message classesevents.py- All event message classesbodies.py- Request arguments and response bodiesbase.py- Base classes (Request, Response, Event, ProtocolMessage)
Quick Reference
Common DAP Operations
# Import protocol types
from aidb.dap.protocol import (
InitializeRequest,
LaunchRequest,
SetBreakpointsRequest,
StackTraceRequest,
ScopesRequest,
VariablesRequest,
ContinueRequest,
)
from aidb.dap.protocol.types import Source, SourceBreakpoint
from aidb.dap.protocol.bodies import (
InitializeRequestArguments,
LaunchRequestArguments,
SetBreakpointsArguments,
StackTraceArguments,
)
# Get next sequence number
seq = await client.get_next_seq()
# Build a request
request = SetBreakpointsRequest(
seq=seq,
arguments=SetBreakpointsArguments(
source=Source(path="/path/to/file.py"),
breakpoints=[
SourceBreakpoint(line=10, condition="x > 5")
]
)
)
# Send request and await response
response = await client.send_request(request)
Client Constants
Always use constants from src/aidb/dap/client/constants.py:
from aidb.dap.client.constants import (
CommandType,
EventType,
StopReason,
)
# Check event type
if event.event == EventType.STOPPED.value:
# Handle stopped event
pass
# Check stop reason
if stopped_body.reason == StopReason.BREAKPOINT.value:
# Handle breakpoint
pass
Protocol Flow Overview
Standard Initialization Sequence
Client → Initialize Request
← Initialize Response (capabilities)
← Initialized Event
Client → SetBreakpoints (optional, multiple)
Client → SetExceptionBreakpoints (optional)
Client → ConfigurationDone Request
← ConfigurationDone Response
Client → Launch/Attach Request
← Launch/Attach Response
[Debug session active]
Introspection Flow
← Stopped Event
Client → Threads Request
← Threads Response
Client → StackTrace Request (threadId)
← StackTrace Response (stackFrames)
Client → Scopes Request (frameId)
← Scopes Response (scopes)
Client → Variables Request (variablesReference)
← Variables Response (variables)
Execution Control
Client → Continue/Next/StepIn/StepOut Request
← Response (acknowledgement)
← Stopped Event (when execution stops again)
Resource Files
This skill is organized into focused resource files, each under 500 lines:
Core Protocol Operations
-
- Initialize request/response
- Attach vs Launch differences
- Configuration done sequence
- Language-specific initialization parameters
-
- Setting source breakpoints
- Conditional breakpoints
- Hit conditions and log points
- Breakpoint verification
- Language-specific breakpoint quirks
-
- Stack trace requests
- Frame ID handling
- Scope requests
- Source references
- Language-specific stack frame differences
-
- Variables request
- Variables reference tracking
- Evaluate request
- Expression contexts
- Language-specific variable representations
Patterns & Best Practices
Language-Specific Differences
Python (debugpy)
- Uses
launchorattachrequest types justMyCodecontro
Установить dap-protocol-guide в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл dap-protocol-guide?
Comprehensive guide for working with Debug Adapter Protocol in AIDB
Как установить скилл dap-protocol-guide?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dap-protocol-guide запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic