Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Where is the Documentation for VSCode's Debug Adapter and Protocol implementation?

未关闭
#450 1 条评论 5 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
30/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
停滞
技术栈
typescript, vscode

调研方向

先阅读 Debugger Extension Guide、DAP specification、VS Code API Reference 和 VS Code Mock Debug,然后检查所引用的 debugProtocol.ts 和 loggingDebugSession.ts 文件。将其中的描述与 breakpointLocations 的 release notes 以及所引用的 issue 讨论进行比较。完成的标准是添加官方背景,说明各项 capability 的用途、面向用户的行为,以及 LoggingDebugSession 的选项和机制。

由索引模型根据 Issue 内容生成。

描述

feature-request

I’ve been trying to work my way through Debugger Extension documentation to improve an existing debugger extension. My resources so far have been:

  1. Debugger Extension Guide
  2. Debug Adapter Protocol Overview
  3. Debug Adapter Protocol Specification
  4. VS Code API Reference
  5. VS Code Mock Debug

I would love to add "Documentation for VS Code's DAP Implementation" to that list, but I have unfortunately not been able to find it. The best I've found is using JSDoc-driven IntelliSense on this package, but that has been less helpful than expected.

When attempting to determine how to map DAP Capabilities to the debugger I'm integrating, it helps to have a good understanding of how VS Code is going to use a feature.

One good example would be the supportsBreakpointLocationRequest capability. Here is its JSDoc comment in its entirety:

The debug adapter supports the breakpointLocations request.

Okay... that sounds like a DAP reference. Let's look at what the specification has to say about BreakpointLocations Requests:

The breakpointLocations request returns all possible locations for source breakpoints in a given range.

At this point I'm still confused. Looking at the members of the related BreakpointLocationsArguments type provides a bit of insight, but it doesn't definitively help me understand what the purpose of this capability is...

A web search for related keywords finally turns up something helpful:

Finding possible breakpoints in a source range

The new breakpointLocations request can be used by a DAP client to find all possible breakpoint locations in a given source range. This can be used in the UI in order to improve the discoverability of "inline" ("column") breakpoints.

Ahh! This is how we enable column breakpoints! Got it! That helpful context was provided in VS Code release notes from September 2019...

Would it be possible to add this to some official documentation, whether that be in the DAP Specification or VS Code's specific implementation, or both?

Other examples that I've contended (or am still contending) with:

  1. The supportsSetExpression capability. I found the necessary context in a previous GitHub Issue.
  2. The LoggingDebugSession class. This is the base class for the VS Code Mock Debug project's MockDebugSession class. That project appears to be how Debug Extension architecture is currently communicated. There is no discussion about what options exist for base classes here and no documentation about what LoggingDebugSession provides beyond its base class (yes logging, but via what mechanism exactly?). The only way to know is to look to the source code and learn it.

In general, I think the documentation for the DAP and VS Code's specific implementation thereof could be greatly enhanced by providing deeper context for features. As someone newly interfacing with the API and familiar with my own debugger's capabilities, it would make my life much easier to understand what end-user experience is enabled by a feature/capability; to understand the "why" behind an API, rather than just the "what".

主要语言
HTML
星标
1.8k
派生
173
平均合并
7 天 7 小时
30 天内合并 PR
2

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/debug-adapter-protocol 的其他 Issue

查看 microsoft/debug-adapter-protocol 的全部 Issue

相似的 Issue

更多 DevTools Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。