├── .devcontainer └── devcontainer.json ├── .github └── workflows │ └── branch-policy.yml ├── .gitignore ├── .vscode ├── launch.json └── settings.json ├── 404.html ├── Gemfile ├── Gemfile.lock ├── License-code.txt ├── License.txt ├── README.md ├── SECURITY.md ├── _config.yml ├── _data └── specification-toc.yml ├── _implementors ├── adapters.md ├── sdks.md └── tools.md ├── _includes ├── cookie_notice.html ├── footer.html ├── head.html ├── js_files.html └── topnav.html ├── _layouts ├── default.html ├── implementors.html ├── singlePage.html └── specification.html ├── changelog.md ├── contributing.md ├── css ├── bootswatch │ └── cosmo │ │ └── bootstrap.min.css ├── fontawesome-all.min.css └── main.scss ├── debugAdapterProtocol.json ├── diagrams ├── build.mjs ├── init-launch.mmd ├── package-lock.json ├── package.json └── stop-continue-terminate.mmd ├── img ├── breakpoint.png ├── init-launch.svg ├── java-threads.png ├── microsoft-logo-inverted.png ├── microsoft-logo.png ├── node-repl.gif ├── python-inline-values.gif ├── stop-continue-terminate.svg ├── with-DAP.png └── without-DAP.png ├── index.html ├── js └── page.js ├── overview.md ├── spec-generator ├── generator.ts ├── json_schema.d.ts ├── package-lock.json ├── package.json └── tsconfig.json ├── specification.md └── webfonts ├── fa-brands-400.eot ├── fa-brands-400.svg ├── fa-brands-400.ttf ├── fa-brands-400.woff ├── fa-brands-400.woff2 ├── fa-regular-400.eot ├── fa-regular-400.svg ├── fa-regular-400.ttf ├── fa-regular-400.woff ├── fa-regular-400.woff2 ├── fa-solid-900.eot ├── fa-solid-900.svg ├── fa-solid-900.ttf ├── fa-solid-900.woff └── fa-solid-900.woff2 /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the 2 | // README at: https://github.com/devcontainers/templates/tree/main/src/jekyll 3 | { 4 | "name": "Jekyll", 5 | // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile 6 | "image": "mcr.microsoft.com/devcontainers/jekyll:2-bullseye" 7 | 8 | // Features to add to the dev container. More info: https://containers.dev/features. 9 | // "features": {}, 10 | 11 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 12 | // "forwardPorts": [], 13 | 14 | // Uncomment the next line to run commands after the container is created. 15 | // "postCreateCommand": "jekyll --version" 16 | 17 | // Configure tool-specific properties. 18 | // "customizations": {}, 19 | 20 | // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. 21 | // "remoteUser": "root" 22 | } 23 | -------------------------------------------------------------------------------- /.github/workflows/branch-policy.yml: -------------------------------------------------------------------------------- 1 | name: Branch Policy 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - gh-pages 7 | 8 | jobs: 9 | check_author: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Protected gh-pages 13 | run: | 14 | PR_AUTHOR="${{ github.actor }}" 15 | ALLOWED_AUTHORS=("connor4312" "roblourens") 16 | 17 | if [[ " ${ALLOWED_AUTHORS[@]} " =~ " ${PR_AUTHOR} " ]]; then 18 | echo "'${PR_AUTHOR}' is allowed to make PRs to gh-pages" 19 | else 20 | echo "'${PR_AUTHOR}' is not allowed to make PRs to 'gh-pages', please target the 'main' branch instead" 21 | exit 1 22 | fi 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | npm-debug.log 2 | _site 3 | **/node_modules 4 | spec-generator/out 5 | .gitignore 6 | .jekyll-metadata 7 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "type": "node", 6 | "request": "launch", 7 | "name": "Generate specification.md", 8 | "program": "${workspaceRoot}/spec-generator/generator.ts", 9 | "outFiles": [ "${workspaceRoot}/spec-generator/out/**/*.js" ] 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "git.branchProtection": [ 3 | "main", 4 | "gh-pages" 5 | ], 6 | "git.branchProtectionPrompt": "alwaysCommitToNewBranch", 7 | } -------------------------------------------------------------------------------- /404.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
6 |

The page you are looking for cannot be found.

7 |

404

8 |
9 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | ruby RUBY_VERSION 3 | 4 | gem "jekyll", "3.10.0" 5 | 6 | # to use GitHub Pages 7 | # gem "github-pages", group: :jekyll_plugins 8 | 9 | # If you have any plugins, put them here! 10 | group :jekyll_plugins do 11 | gem "jemoji" 12 | gem "github-pages" 13 | gem "jekyll-remote-theme" 14 | end 15 | 16 | # Windows does not include zoneinfo files, so bundle the tzinfo-data gem 17 | gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 18 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | activesupport (6.1.7.5) 5 | concurrent-ruby (~> 1.0, >= 1.0.2) 6 | i18n (>= 1.6, < 2) 7 | minitest (>= 5.1) 8 | tzinfo (~> 2.0) 9 | zeitwerk (~> 2.3) 10 | addressable (2.8.1) 11 | public_suffix (>= 2.0.2, < 6.0) 12 | coffee-script (2.4.1) 13 | coffee-script-source 14 | execjs 15 | coffee-script-source (1.12.2) 16 | colorator (1.1.0) 17 | commonmarker (0.23.10) 18 | concurrent-ruby (1.3.4) 19 | csv (3.3.0) 20 | dnsruby (1.72.2) 21 | simpleidn (~> 0.2.1) 22 | em-websocket (0.5.3) 23 | eventmachine (>= 0.12.9) 24 | http_parser.rb (~> 0) 25 | ethon (0.15.0) 26 | ffi (>= 1.15.0) 27 | eventmachine (1.2.7) 28 | execjs (2.7.0) 29 | faraday (2.6.0) 30 | faraday-net_http (>= 2.0, < 3.1) 31 | ruby2_keywords (>= 0.0.4) 32 | faraday-net_http (3.0.0) 33 | ffi (1.15.5) 34 | forwardable-extended (2.6.0) 35 | gemoji (3.0.0) 36 | github-pages (232) 37 | github-pages-health-check (= 1.18.2) 38 | jekyll (= 3.10.0) 39 | jekyll-avatar (= 0.8.0) 40 | jekyll-coffeescript (= 1.2.2) 41 | jekyll-commonmark-ghpages (= 0.5.1) 42 | jekyll-default-layout (= 0.1.5) 43 | jekyll-feed (= 0.17.0) 44 | jekyll-gist (= 1.5.0) 45 | jekyll-github-metadata (= 2.16.1) 46 | jekyll-include-cache (= 0.2.1) 47 | jekyll-mentions (= 1.6.0) 48 | jekyll-optional-front-matter (= 0.3.2) 49 | jekyll-paginate (= 1.1.0) 50 | jekyll-readme-index (= 0.3.0) 51 | jekyll-redirect-from (= 0.16.0) 52 | jekyll-relative-links (= 0.6.1) 53 | jekyll-remote-theme (= 0.4.3) 54 | jekyll-sass-converter (= 1.5.2) 55 | jekyll-seo-tag (= 2.8.0) 56 | jekyll-sitemap (= 1.4.0) 57 | jekyll-swiss (= 1.0.0) 58 | jekyll-theme-architect (= 0.2.0) 59 | jekyll-theme-cayman (= 0.2.0) 60 | jekyll-theme-dinky (= 0.2.0) 61 | jekyll-theme-hacker (= 0.2.0) 62 | jekyll-theme-leap-day (= 0.2.0) 63 | jekyll-theme-merlot (= 0.2.0) 64 | jekyll-theme-midnight (= 0.2.0) 65 | jekyll-theme-minimal (= 0.2.0) 66 | jekyll-theme-modernist (= 0.2.0) 67 | jekyll-theme-primer (= 0.6.0) 68 | jekyll-theme-slate (= 0.2.0) 69 | jekyll-theme-tactile (= 0.2.0) 70 | jekyll-theme-time-machine (= 0.2.0) 71 | jekyll-titles-from-headings (= 0.5.3) 72 | jemoji (= 0.13.0) 73 | kramdown (= 2.4.0) 74 | kramdown-parser-gfm (= 1.1.0) 75 | liquid (= 4.0.4) 76 | mercenary (~> 0.3) 77 | minima (= 2.5.1) 78 | nokogiri (>= 1.16.2, < 2.0) 79 | rouge (= 3.30.0) 80 | terminal-table (~> 1.4) 81 | webrick (~> 1.8) 82 | github-pages-health-check (1.18.2) 83 | addressable (~> 2.3) 84 | dnsruby (~> 1.60) 85 | octokit (>= 4, < 8) 86 | public_suffix (>= 3.0, < 6.0) 87 | typhoeus (~> 1.3) 88 | html-pipeline (2.8.0) 89 | activesupport (>= 2) 90 | nokogiri (>= 1.4) 91 | http_parser.rb (0.8.0) 92 | i18n (1.14.6) 93 | concurrent-ruby (~> 1.0) 94 | jekyll (3.10.0) 95 | addressable (~> 2.4) 96 | colorator (~> 1.0) 97 | csv (~> 3.0) 98 | em-websocket (~> 0.5) 99 | i18n (>= 0.7, < 2) 100 | jekyll-sass-converter (~> 1.0) 101 | jekyll-watch (~> 2.0) 102 | kramdown (>= 1.17, < 3) 103 | liquid (~> 4.0) 104 | mercenary (~> 0.3.3) 105 | pathutil (~> 0.9) 106 | rouge (>= 1.7, < 4) 107 | safe_yaml (~> 1.0) 108 | webrick (>= 1.0) 109 | jekyll-avatar (0.8.0) 110 | jekyll (>= 3.0, < 5.0) 111 | jekyll-coffeescript (1.2.2) 112 | coffee-script (~> 2.2) 113 | coffee-script-source (~> 1.12) 114 | jekyll-commonmark (1.4.0) 115 | commonmarker (~> 0.22) 116 | jekyll-commonmark-ghpages (0.5.1) 117 | commonmarker (>= 0.23.7, < 1.1.0) 118 | jekyll (>= 3.9, < 4.0) 119 | jekyll-commonmark (~> 1.4.0) 120 | rouge (>= 2.0, < 5.0) 121 | jekyll-default-layout (0.1.5) 122 | jekyll (>= 3.0, < 5.0) 123 | jekyll-feed (0.17.0) 124 | jekyll (>= 3.7, < 5.0) 125 | jekyll-gist (1.5.0) 126 | octokit (~> 4.2) 127 | jekyll-github-metadata (2.16.1) 128 | jekyll (>= 3.4, < 5.0) 129 | octokit (>= 4, < 7, != 4.4.0) 130 | jekyll-include-cache (0.2.1) 131 | jekyll (>= 3.7, < 5.0) 132 | jekyll-mentions (1.6.0) 133 | html-pipeline (~> 2.3) 134 | jekyll (>= 3.7, < 5.0) 135 | jekyll-optional-front-matter (0.3.2) 136 | jekyll (>= 3.0, < 5.0) 137 | jekyll-paginate (1.1.0) 138 | jekyll-readme-index (0.3.0) 139 | jekyll (>= 3.0, < 5.0) 140 | jekyll-redirect-from (0.16.0) 141 | jekyll (>= 3.3, < 5.0) 142 | jekyll-relative-links (0.6.1) 143 | jekyll (>= 3.3, < 5.0) 144 | jekyll-remote-theme (0.4.3) 145 | addressable (~> 2.0) 146 | jekyll (>= 3.5, < 5.0) 147 | jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) 148 | rubyzip (>= 1.3.0, < 3.0) 149 | jekyll-sass-converter (1.5.2) 150 | sass (~> 3.4) 151 | jekyll-seo-tag (2.8.0) 152 | jekyll (>= 3.8, < 5.0) 153 | jekyll-sitemap (1.4.0) 154 | jekyll (>= 3.7, < 5.0) 155 | jekyll-swiss (1.0.0) 156 | jekyll-theme-architect (0.2.0) 157 | jekyll (> 3.5, < 5.0) 158 | jekyll-seo-tag (~> 2.0) 159 | jekyll-theme-cayman (0.2.0) 160 | jekyll (> 3.5, < 5.0) 161 | jekyll-seo-tag (~> 2.0) 162 | jekyll-theme-dinky (0.2.0) 163 | jekyll (> 3.5, < 5.0) 164 | jekyll-seo-tag (~> 2.0) 165 | jekyll-theme-hacker (0.2.0) 166 | jekyll (> 3.5, < 5.0) 167 | jekyll-seo-tag (~> 2.0) 168 | jekyll-theme-leap-day (0.2.0) 169 | jekyll (> 3.5, < 5.0) 170 | jekyll-seo-tag (~> 2.0) 171 | jekyll-theme-merlot (0.2.0) 172 | jekyll (> 3.5, < 5.0) 173 | jekyll-seo-tag (~> 2.0) 174 | jekyll-theme-midnight (0.2.0) 175 | jekyll (> 3.5, < 5.0) 176 | jekyll-seo-tag (~> 2.0) 177 | jekyll-theme-minimal (0.2.0) 178 | jekyll (> 3.5, < 5.0) 179 | jekyll-seo-tag (~> 2.0) 180 | jekyll-theme-modernist (0.2.0) 181 | jekyll (> 3.5, < 5.0) 182 | jekyll-seo-tag (~> 2.0) 183 | jekyll-theme-primer (0.6.0) 184 | jekyll (> 3.5, < 5.0) 185 | jekyll-github-metadata (~> 2.9) 186 | jekyll-seo-tag (~> 2.0) 187 | jekyll-theme-slate (0.2.0) 188 | jekyll (> 3.5, < 5.0) 189 | jekyll-seo-tag (~> 2.0) 190 | jekyll-theme-tactile (0.2.0) 191 | jekyll (> 3.5, < 5.0) 192 | jekyll-seo-tag (~> 2.0) 193 | jekyll-theme-time-machine (0.2.0) 194 | jekyll (> 3.5, < 5.0) 195 | jekyll-seo-tag (~> 2.0) 196 | jekyll-titles-from-headings (0.5.3) 197 | jekyll (>= 3.3, < 5.0) 198 | jekyll-watch (2.2.1) 199 | listen (~> 3.0) 200 | jemoji (0.13.0) 201 | gemoji (>= 3, < 5) 202 | html-pipeline (~> 2.2) 203 | jekyll (>= 3.0, < 5.0) 204 | kramdown (2.4.0) 205 | rexml 206 | kramdown-parser-gfm (1.1.0) 207 | kramdown (~> 2.0) 208 | liquid (4.0.4) 209 | listen (3.9.0) 210 | rb-fsevent (~> 0.10, >= 0.10.3) 211 | rb-inotify (~> 0.9, >= 0.9.10) 212 | mercenary (0.3.6) 213 | mini_portile2 (2.8.8) 214 | minima (2.5.1) 215 | jekyll (>= 3.5, < 5.0) 216 | jekyll-feed (~> 0.9) 217 | jekyll-seo-tag (~> 2.1) 218 | minitest (5.25.1) 219 | nokogiri (1.18.8) 220 | mini_portile2 (~> 2.8.2) 221 | racc (~> 1.4) 222 | octokit (4.25.1) 223 | faraday (>= 1, < 3) 224 | sawyer (~> 0.9) 225 | pathutil (0.16.2) 226 | forwardable-extended (~> 2.6) 227 | public_suffix (5.1.1) 228 | racc (1.8.1) 229 | rb-fsevent (0.10.3) 230 | rb-inotify (0.9.10) 231 | ffi (>= 0.5.0, < 2) 232 | rexml (3.3.9) 233 | rouge (3.30.0) 234 | ruby2_keywords (0.0.5) 235 | rubyzip (2.3.2) 236 | safe_yaml (1.0.5) 237 | sass (3.5.6) 238 | sass-listen (~> 4.0.0) 239 | sass-listen (4.0.0) 240 | rb-fsevent (~> 0.9, >= 0.9.4) 241 | rb-inotify (~> 0.9, >= 0.9.7) 242 | sawyer (0.9.2) 243 | addressable (>= 2.3.5) 244 | faraday (>= 0.17.3, < 3) 245 | simpleidn (0.2.3) 246 | terminal-table (1.8.0) 247 | unicode-display_width (~> 1.1, >= 1.1.1) 248 | typhoeus (1.4.1) 249 | ethon (>= 0.9.0) 250 | tzinfo (2.0.6) 251 | concurrent-ruby (~> 1.0) 252 | unicode-display_width (1.4.0) 253 | webrick (1.8.2) 254 | zeitwerk (2.6.18) 255 | 256 | PLATFORMS 257 | ruby 258 | 259 | DEPENDENCIES 260 | github-pages 261 | jekyll (= 3.10.0) 262 | jekyll-remote-theme 263 | jemoji 264 | tzinfo-data 265 | 266 | RUBY VERSION 267 | ruby 3.3.4p94 268 | 269 | BUNDLED WITH 270 | 2.5.18 271 | -------------------------------------------------------------------------------- /License-code.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /License.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) Microsoft Corporation. 2 | 3 | All rights reserved. 4 | 5 | Distributed under the following terms: 6 | 7 | 1. Documentation is licensed under the Creative Commons Attribution 3.0 United States License. Code is licensed under the MIT License. 8 | 2. This license does not grant you rights to use any trademarks or logos of Microsoft. For Microsoft’s general trademark guidelines, go to http://go.microsoft.com/fwlink/?LinkID=254653 9 | 10 | --- 11 | 12 | Attribution 4.0 International 13 | 14 | ======================================================================= 15 | 16 | Creative Commons Corporation ("Creative Commons") is not a law firm and 17 | does not provide legal services or legal advice. Distribution of 18 | Creative Commons public licenses does not create a lawyer-client or 19 | other relationship. Creative Commons makes its licenses and related 20 | information available on an "as-is" basis. Creative Commons gives no 21 | warranties regarding its licenses, any material licensed under their 22 | terms and conditions, or any related information. Creative Commons 23 | disclaims all liability for damages resulting from their use to the 24 | fullest extent possible. 25 | 26 | Using Creative Commons Public Licenses 27 | 28 | Creative Commons public licenses provide a standard set of terms and 29 | conditions that creators and other rights holders may use to share 30 | original works of authorship and other material subject to copyright 31 | and certain other rights specified in the public license below. The 32 | following considerations are for informational purposes only, are not 33 | exhaustive, and do not form part of our licenses. 34 | 35 | Considerations for licensors: Our public licenses are 36 | intended for use by those authorized to give the public 37 | permission to use material in ways otherwise restricted by 38 | copyright and certain other rights. Our licenses are 39 | irrevocable. Licensors should read and understand the terms 40 | and conditions of the license they choose before applying it. 41 | Licensors should also secure all rights necessary before 42 | applying our licenses so that the public can reuse the 43 | material as expected. Licensors should clearly mark any 44 | material not subject to the license. This includes other CC- 45 | licensed material, or material used under an exception or 46 | limitation to copyright. More considerations for licensors: 47 | wiki.creativecommons.org/Considerations_for_licensors 48 | 49 | Considerations for the public: By using one of our public 50 | licenses, a licensor grants the public permission to use the 51 | licensed material under specified terms and conditions. If 52 | the licensor's permission is not necessary for any reason--for 53 | example, because of any applicable exception or limitation to 54 | copyright--then that use is not regulated by the license. Our 55 | licenses grant only permissions under copyright and certain 56 | other rights that a licensor has authority to grant. Use of 57 | the licensed material may still be restricted for other 58 | reasons, including because others have copyright or other 59 | rights in the material. A licensor may make special requests, 60 | such as asking that all changes be marked or described. 61 | Although not required by our licenses, you are encouraged to 62 | respect those requests where reasonable. More_considerations 63 | for the public: 64 | wiki.creativecommons.org/Considerations_for_licensees 65 | 66 | ======================================================================= 67 | 68 | Creative Commons Attribution 4.0 International Public License 69 | 70 | By exercising the Licensed Rights (defined below), You accept and agree 71 | to be bound by the terms and conditions of this Creative Commons 72 | Attribution 4.0 International Public License ("Public License"). To the 73 | extent this Public License may be interpreted as a contract, You are 74 | granted the Licensed Rights in consideration of Your acceptance of 75 | these terms and conditions, and the Licensor grants You such rights in 76 | consideration of benefits the Licensor receives from making the 77 | Licensed Material available under these terms and conditions. 78 | 79 | 80 | Section 1 -- Definitions. 81 | 82 | a. Adapted Material means material subject to Copyright and Similar 83 | Rights that is derived from or based upon the Licensed Material 84 | and in which the Licensed Material is translated, altered, 85 | arranged, transformed, or otherwise modified in a manner requiring 86 | permission under the Copyright and Similar Rights held by the 87 | Licensor. For purposes of this Public License, where the Licensed 88 | Material is a musical work, performance, or sound recording, 89 | Adapted Material is always produced where the Licensed Material is 90 | synched in timed relation with a moving image. 91 | 92 | b. Adapter's License means the license You apply to Your Copyright 93 | and Similar Rights in Your contributions to Adapted Material in 94 | accordance with the terms and conditions of this Public License. 95 | 96 | c. Copyright and Similar Rights means copyright and/or similar rights 97 | closely related to copyright including, without limitation, 98 | performance, broadcast, sound recording, and Sui Generis Database 99 | Rights, without regard to how the rights are labeled or 100 | categorized. For purposes of this Public License, the rights 101 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 102 | Rights. 103 | 104 | d. Effective Technological Measures means those measures that, in the 105 | absence of proper authority, may not be circumvented under laws 106 | fulfilling obligations under Article 11 of the WIPO Copyright 107 | Treaty adopted on December 20, 1996, and/or similar international 108 | agreements. 109 | 110 | e. Exceptions and Limitations means fair use, fair dealing, and/or 111 | any other exception or limitation to Copyright and Similar Rights 112 | that applies to Your use of the Licensed Material. 113 | 114 | f. Licensed Material means the artistic or literary work, database, 115 | or other material to which the Licensor applied this Public 116 | License. 117 | 118 | g. Licensed Rights means the rights granted to You subject to the 119 | terms and conditions of this Public License, which are limited to 120 | all Copyright and Similar Rights that apply to Your use of the 121 | Licensed Material and that the Licensor has authority to license. 122 | 123 | h. Licensor means the individual(s) or entity(ies) granting rights 124 | under this Public License. 125 | 126 | i. Share means to provide material to the public by any means or 127 | process that requires permission under the Licensed Rights, such 128 | as reproduction, public display, public performance, distribution, 129 | dissemination, communication, or importation, and to make material 130 | available to the public including in ways that members of the 131 | public may access the material from a place and at a time 132 | individually chosen by them. 133 | 134 | j. Sui Generis Database Rights means rights other than copyright 135 | resulting from Directive 96/9/EC of the European Parliament and of 136 | the Council of 11 March 1996 on the legal protection of databases, 137 | as amended and/or succeeded, as well as other essentially 138 | equivalent rights anywhere in the world. 139 | 140 | k. You means the individual or entity exercising the Licensed Rights 141 | under this Public License. Your has a corresponding meaning. 142 | 143 | 144 | Section 2 -- Scope. 145 | 146 | a. License grant. 147 | 148 | 1. Subject to the terms and conditions of this Public License, 149 | the Licensor hereby grants You a worldwide, royalty-free, 150 | non-sublicensable, non-exclusive, irrevocable license to 151 | exercise the Licensed Rights in the Licensed Material to: 152 | 153 | a. reproduce and Share the Licensed Material, in whole or 154 | in part; and 155 | 156 | b. produce, reproduce, and Share Adapted Material. 157 | 158 | 2. Exceptions and Limitations. For the avoidance of doubt, where 159 | Exceptions and Limitations apply to Your use, this Public 160 | License does not apply, and You do not need to comply with 161 | its terms and conditions. 162 | 163 | 3. Term. The term of this Public License is specified in Section 164 | 6(a). 165 | 166 | 4. Media and formats; technical modifications allowed. The 167 | Licensor authorizes You to exercise the Licensed Rights in 168 | all media and formats whether now known or hereafter created, 169 | and to make technical modifications necessary to do so. The 170 | Licensor waives and/or agrees not to assert any right or 171 | authority to forbid You from making technical modifications 172 | necessary to exercise the Licensed Rights, including 173 | technical modifications necessary to circumvent Effective 174 | Technological Measures. For purposes of this Public License, 175 | simply making modifications authorized by this Section 2(a) 176 | (4) never produces Adapted Material. 177 | 178 | 5. Downstream recipients. 179 | 180 | a. Offer from the Licensor -- Licensed Material. Every 181 | recipient of the Licensed Material automatically 182 | receives an offer from the Licensor to exercise the 183 | Licensed Rights under the terms and conditions of this 184 | Public License. 185 | 186 | b. No downstream restrictions. You may not offer or impose 187 | any additional or different terms or conditions on, or 188 | apply any Effective Technological Measures to, the 189 | Licensed Material if doing so restricts exercise of the 190 | Licensed Rights by any recipient of the Licensed 191 | Material. 192 | 193 | 6. No endorsement. Nothing in this Public License constitutes or 194 | may be construed as permission to assert or imply that You 195 | are, or that Your use of the Licensed Material is, connected 196 | with, or sponsored, endorsed, or granted official status by, 197 | the Licensor or others designated to receive attribution as 198 | provided in Section 3(a)(1)(A)(i). 199 | 200 | b. Other rights. 201 | 202 | 1. Moral rights, such as the right of integrity, are not 203 | licensed under this Public License, nor are publicity, 204 | privacy, and/or other similar personality rights; however, to 205 | the extent possible, the Licensor waives and/or agrees not to 206 | assert any such rights held by the Licensor to the limited 207 | extent necessary to allow You to exercise the Licensed 208 | Rights, but not otherwise. 209 | 210 | 2. Patent and trademark rights are not licensed under this 211 | Public License. 212 | 213 | 3. To the extent possible, the Licensor waives any right to 214 | collect royalties from You for the exercise of the Licensed 215 | Rights, whether directly or through a collecting society 216 | under any voluntary or waivable statutory or compulsory 217 | licensing scheme. In all other cases the Licensor expressly 218 | reserves any right to collect such royalties. 219 | 220 | 221 | Section 3 -- License Conditions. 222 | 223 | Your exercise of the Licensed Rights is expressly made subject to the 224 | following conditions. 225 | 226 | a. Attribution. 227 | 228 | 1. If You Share the Licensed Material (including in modified 229 | form), You must: 230 | 231 | a. retain the following if it is supplied by the Licensor 232 | with the Licensed Material: 233 | 234 | i. identification of the creator(s) of the Licensed 235 | Material and any others designated to receive 236 | attribution, in any reasonable manner requested by 237 | the Licensor (including by pseudonym if 238 | designated); 239 | 240 | ii. a copyright notice; 241 | 242 | iii. a notice that refers to this Public License; 243 | 244 | iv. a notice that refers to the disclaimer of 245 | warranties; 246 | 247 | v. a URI or hyperlink to the Licensed Material to the 248 | extent reasonably practicable; 249 | 250 | b. indicate if You modified the Licensed Material and 251 | retain an indication of any previous modifications; and 252 | 253 | c. indicate the Licensed Material is licensed under this 254 | Public License, and include the text of, or the URI or 255 | hyperlink to, this Public License. 256 | 257 | 2. You may satisfy the conditions in Section 3(a)(1) in any 258 | reasonable manner based on the medium, means, and context in 259 | which You Share the Licensed Material. For example, it may be 260 | reasonable to satisfy the conditions by providing a URI or 261 | hyperlink to a resource that includes the required 262 | information. 263 | 264 | 3. If requested by the Licensor, You must remove any of the 265 | information required by Section 3(a)(1)(A) to the extent 266 | reasonably practicable. 267 | 268 | 4. If You Share Adapted Material You produce, the Adapter's 269 | License You apply must not prevent recipients of the Adapted 270 | Material from complying with this Public License. 271 | 272 | 273 | Section 4 -- Sui Generis Database Rights. 274 | 275 | Where the Licensed Rights include Sui Generis Database Rights that 276 | apply to Your use of the Licensed Material: 277 | 278 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 279 | to extract, reuse, reproduce, and Share all or a substantial 280 | portion of the contents of the database; 281 | 282 | b. if You include all or a substantial portion of the database 283 | contents in a database in which You have Sui Generis Database 284 | Rights, then the database in which You have Sui Generis Database 285 | Rights (but not its individual contents) is Adapted Material; and 286 | 287 | c. You must comply with the conditions in Section 3(a) if You Share 288 | all or a substantial portion of the contents of the database. 289 | 290 | For the avoidance of doubt, this Section 4 supplements and does not 291 | replace Your obligations under this Public License where the Licensed 292 | Rights include other Copyright and Similar Rights. 293 | 294 | 295 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 296 | 297 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 298 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 299 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 300 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 301 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 302 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 303 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 304 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 305 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 306 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 307 | 308 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 309 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 310 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 311 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 312 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 313 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 314 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 315 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 316 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 317 | 318 | c. The disclaimer of warranties and limitation of liability provided 319 | above shall be interpreted in a manner that, to the extent 320 | possible, most closely approximates an absolute disclaimer and 321 | waiver of all liability. 322 | 323 | 324 | Section 6 -- Term and Termination. 325 | 326 | a. This Public License applies for the term of the Copyright and 327 | Similar Rights licensed here. However, if You fail to comply with 328 | this Public License, then Your rights under this Public License 329 | terminate automatically. 330 | 331 | b. Where Your right to use the Licensed Material has terminated under 332 | Section 6(a), it reinstates: 333 | 334 | 1. automatically as of the date the violation is cured, provided 335 | it is cured within 30 days of Your discovery of the 336 | violation; or 337 | 338 | 2. upon express reinstatement by the Licensor. 339 | 340 | For the avoidance of doubt, this Section 6(b) does not affect any 341 | right the Licensor may have to seek remedies for Your violations 342 | of this Public License. 343 | 344 | c. For the avoidance of doubt, the Licensor may also offer the 345 | Licensed Material under separate terms or conditions or stop 346 | distributing the Licensed Material at any time; however, doing so 347 | will not terminate this Public License. 348 | 349 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 350 | License. 351 | 352 | 353 | Section 7 -- Other Terms and Conditions. 354 | 355 | a. The Licensor shall not be bound by any additional or different 356 | terms or conditions communicated by You unless expressly agreed. 357 | 358 | b. Any arrangements, understandings, or agreements regarding the 359 | Licensed Material not stated herein are separate from and 360 | independent of the terms and conditions of this Public License. 361 | 362 | 363 | Section 8 -- Interpretation. 364 | 365 | a. For the avoidance of doubt, this Public License does not, and 366 | shall not be interpreted to, reduce, limit, restrict, or impose 367 | conditions on any use of the Licensed Material that could lawfully 368 | be made without permission under this Public License. 369 | 370 | b. To the extent possible, if any provision of this Public License is 371 | deemed unenforceable, it shall be automatically reformed to the 372 | minimum extent necessary to make it enforceable. If the provision 373 | cannot be reformed, it shall be severed from this Public License 374 | without affecting the enforceability of the remaining terms and 375 | conditions. 376 | 377 | c. No term or condition of this Public License will be waived and no 378 | failure to comply consented to unless expressly agreed to by the 379 | Licensor. 380 | 381 | d. Nothing in this Public License constitutes or may be interpreted 382 | as a limitation upon, or waiver of, any privileges and immunities 383 | that apply to the Licensor or You, including from the legal 384 | processes of any jurisdiction or authority. 385 | 386 | 387 | ======================================================================= 388 | 389 | Creative Commons is not a party to its public 390 | licenses. Notwithstanding, Creative Commons may elect to apply one of 391 | its public licenses to material it publishes and in those instances 392 | will be considered the “Licensor.” The text of the Creative Commons 393 | public licenses is dedicated to the public domain under the CC0 Public 394 | Domain Dedication. Except for the limited purpose of indicating that 395 | material is shared under a Creative Commons public license or as 396 | otherwise permitted by the Creative Commons policies published at 397 | creativecommons.org/policies, Creative Commons does not authorize the 398 | use of the trademark "Creative Commons" or any other trademark or logo 399 | of Creative Commons without its prior written consent including, 400 | without limitation, in connection with any unauthorized modifications 401 | to any of its public licenses or any other arrangements, 402 | understandings, or agreements concerning use of licensed material. For 403 | the avoidance of doubt, this paragraph does not form part of the 404 | public licenses. 405 | 406 | Creative Commons may be contacted at creativecommons.org. 407 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Debug Adapter Protocol 2 | 3 | The Debug Adapter Protocol is now available through its own [Web site](https://microsoft.github.io/debug-adapter-protocol/). The Web site contains information about how the protocol [works](https://microsoft.github.io/debug-adapter-protocol/overview), a more readable [specification](https://microsoft.github.io/debug-adapter-protocol/specification), and documents listing protocol [implementations](https://microsoft.github.io/debug-adapter-protocol/implementors/adapters/). 4 | 5 | ## Contributing 6 | If you are interested in fixing issues like typos you can either [file an issue](https://github.com/Microsoft/debug-adapter-protocol/issues/new) or provide a pull request containing the changes to the [specification file](https://github.com/Microsoft/debug-adapter-protocol/blob/gh-pages/debugAdapterProtocol.json). 7 | 8 | When proposing an addition to the protocol, then please refer to the [How to Contribute to the Debug Adapter Protocol](contributing.md) document. 9 | 10 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 11 | 12 | ## The Debug Adapter Protocol 13 | 14 | See the [Web site](https://microsoft.github.io/debug-adapter-protocol/) 15 | 16 | ## Running the web site locally 17 | 18 | In the project's root directory start a server with this command: 19 | ``` 20 | bundle exec jekyll serve 21 | ``` 22 | and then open `http://127.0.0.1:4000/debug-adapter-protocol/` in a browser. 23 | 24 | ## License 25 | [Creative Commons Attribution / MIT](License.txt) 26 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Security 4 | 5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). 6 | 7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. 8 | 9 | ## Reporting Security Issues 10 | 11 | **Please do not report security vulnerabilities through public GitHub issues.** 12 | 13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). 14 | 15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). 16 | 17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). 18 | 19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: 20 | 21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) 22 | * Full paths of source file(s) related to the manifestation of the issue 23 | * The location of the affected source code (tag/branch/commit or direct URL) 24 | * Any special configuration required to reproduce the issue 25 | * Step-by-step instructions to reproduce the issue 26 | * Proof-of-concept or exploit code (if possible) 27 | * Impact of the issue, including how an attacker might exploit the issue 28 | 29 | This information will help us triage your report more quickly. 30 | 31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. 32 | 33 | ## Preferred Languages 34 | 35 | We prefer all communications to be in English. 36 | 37 | ## Policy 38 | 39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). 40 | 41 | 42 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # Site settings 2 | title: Official page for Debug Adapter Protocol 3 | description: > 4 | Debug Adapter Protocol documentation and specification page. 5 | 6 | baseurl: /debug-adapter-protocol # the subpath of your site, e.g. /blog/ 7 | url: https://microsoft.github.io/debug-adapter-protocol/ # the base hostname & protocol for your site 8 | git_address: https://github.com/Microsoft/debug-adapter-protocol 9 | git_edit_address: https://github.com/Microsoft/debug-adapter-protocol/blob/gh-pages 10 | 11 | # Build settings 12 | markdown: kramdown 13 | highlighter: rouge 14 | 15 | plugins: 16 | - github-pages 17 | - jemoji 18 | 19 | 20 | exclude: 21 | - Gemfile 22 | - Gemfile.lock 23 | - .idea/ 24 | - .gitignore 25 | - README.md 26 | - resources 27 | - diagrams 28 | - spec-generator 29 | 30 | timezone: Europe/Zurich 31 | 32 | defaults: 33 | - scope: 34 | path: _posts 35 | type: posts 36 | values: 37 | layout: post 38 | sectionid: blog 39 | 40 | - scope: 41 | path: _docs 42 | type: docs 43 | values: 44 | layout: docs 45 | sectionid: docs 46 | seo: 47 | type: "WebPage" 48 | 49 | - scope: 50 | path: _implementors 51 | type: implementors 52 | values: 53 | layout: implementors 54 | sectionid: implementors 55 | 56 | collections: 57 | docs: 58 | permalink: /:collection/:path/ 59 | output: true 60 | posts: 61 | permalink: /blog/:year/:month/:day/:title/ 62 | output: true 63 | implementors: 64 | permalink: /:collection/:path/ 65 | output: true 66 | 67 | -------------------------------------------------------------------------------- /_data/specification-toc.yml: -------------------------------------------------------------------------------- 1 | - title: Debug Adapter Protocol 2 | children: 3 | - title: Base Protocol 4 | anchor: Base_Protocol 5 | children: 6 | - title: Cancel 7 | anchor: Base_Protocol_Cancel 8 | - title: ErrorResponse 9 | anchor: Base_Protocol_ErrorResponse 10 | - title: Event 11 | anchor: Base_Protocol_Event 12 | - title: ProtocolMessage 13 | anchor: Base_Protocol_ProtocolMessage 14 | - title: Request 15 | anchor: Base_Protocol_Request 16 | - title: Response 17 | anchor: Base_Protocol_Response 18 | - title: Events 19 | anchor: Events 20 | children: 21 | - title: Breakpoint 22 | anchor: Events_Breakpoint 23 | - title: Capabilities 24 | anchor: Events_Capabilities 25 | - title: Continued 26 | anchor: Events_Continued 27 | - title: Exited 28 | anchor: Events_Exited 29 | - title: Initialized 30 | anchor: Events_Initialized 31 | - title: Invalidated 32 | anchor: Events_Invalidated 33 | - title: LoadedSource 34 | anchor: Events_LoadedSource 35 | - title: Memory 36 | anchor: Events_Memory 37 | - title: Module 38 | anchor: Events_Module 39 | - title: Output 40 | anchor: Events_Output 41 | - title: Process 42 | anchor: Events_Process 43 | - title: ProgressEnd 44 | anchor: Events_ProgressEnd 45 | - title: ProgressStart 46 | anchor: Events_ProgressStart 47 | - title: ProgressUpdate 48 | anchor: Events_ProgressUpdate 49 | - title: Stopped 50 | anchor: Events_Stopped 51 | - title: Terminated 52 | anchor: Events_Terminated 53 | - title: Thread 54 | anchor: Events_Thread 55 | - title: Requests 56 | anchor: Requests 57 | children: 58 | - title: Attach 59 | anchor: Requests_Attach 60 | - title: BreakpointLocations 61 | anchor: Requests_BreakpointLocations 62 | - title: Completions 63 | anchor: Requests_Completions 64 | - title: ConfigurationDone 65 | anchor: Requests_ConfigurationDone 66 | - title: Continue 67 | anchor: Requests_Continue 68 | - title: DataBreakpointInfo 69 | anchor: Requests_DataBreakpointInfo 70 | - title: Disassemble 71 | anchor: Requests_Disassemble 72 | - title: Disconnect 73 | anchor: Requests_Disconnect 74 | - title: Evaluate 75 | anchor: Requests_Evaluate 76 | - title: ExceptionInfo 77 | anchor: Requests_ExceptionInfo 78 | - title: Goto 79 | anchor: Requests_Goto 80 | - title: GotoTargets 81 | anchor: Requests_GotoTargets 82 | - title: Initialize 83 | anchor: Requests_Initialize 84 | - title: Launch 85 | anchor: Requests_Launch 86 | - title: LoadedSources 87 | anchor: Requests_LoadedSources 88 | - title: Locations 89 | anchor: Requests_Locations 90 | - title: Modules 91 | anchor: Requests_Modules 92 | - title: Next 93 | anchor: Requests_Next 94 | - title: Pause 95 | anchor: Requests_Pause 96 | - title: ReadMemory 97 | anchor: Requests_ReadMemory 98 | - title: Restart 99 | anchor: Requests_Restart 100 | - title: RestartFrame 101 | anchor: Requests_RestartFrame 102 | - title: ReverseContinue 103 | anchor: Requests_ReverseContinue 104 | - title: Scopes 105 | anchor: Requests_Scopes 106 | - title: SetBreakpoints 107 | anchor: Requests_SetBreakpoints 108 | - title: SetDataBreakpoints 109 | anchor: Requests_SetDataBreakpoints 110 | - title: SetExceptionBreakpoints 111 | anchor: Requests_SetExceptionBreakpoints 112 | - title: SetExpression 113 | anchor: Requests_SetExpression 114 | - title: SetFunctionBreakpoints 115 | anchor: Requests_SetFunctionBreakpoints 116 | - title: SetInstructionBreakpoints 117 | anchor: Requests_SetInstructionBreakpoints 118 | - title: SetVariable 119 | anchor: Requests_SetVariable 120 | - title: Source 121 | anchor: Requests_Source 122 | - title: StackTrace 123 | anchor: Requests_StackTrace 124 | - title: StepBack 125 | anchor: Requests_StepBack 126 | - title: StepIn 127 | anchor: Requests_StepIn 128 | - title: StepInTargets 129 | anchor: Requests_StepInTargets 130 | - title: StepOut 131 | anchor: Requests_StepOut 132 | - title: Terminate 133 | anchor: Requests_Terminate 134 | - title: TerminateThreads 135 | anchor: Requests_TerminateThreads 136 | - title: Threads 137 | anchor: Requests_Threads 138 | - title: Variables 139 | anchor: Requests_Variables 140 | - title: WriteMemory 141 | anchor: Requests_WriteMemory 142 | - title: Reverse Requests 143 | anchor: Reverse_Requests 144 | children: 145 | - title: RunInTerminal 146 | anchor: Reverse_Requests_RunInTerminal 147 | - title: StartDebugging 148 | anchor: Reverse_Requests_StartDebugging 149 | - title: Types 150 | anchor: Types 151 | children: 152 | - title: Breakpoint 153 | anchor: Types_Breakpoint 154 | - title: BreakpointLocation 155 | anchor: Types_BreakpointLocation 156 | - title: BreakpointMode 157 | anchor: Types_BreakpointMode 158 | - title: BreakpointModeApplicability 159 | anchor: Types_BreakpointModeApplicability 160 | - title: Capabilities 161 | anchor: Types_Capabilities 162 | - title: Checksum 163 | anchor: Types_Checksum 164 | - title: ChecksumAlgorithm 165 | anchor: Types_ChecksumAlgorithm 166 | - title: ColumnDescriptor 167 | anchor: Types_ColumnDescriptor 168 | - title: CompletionItem 169 | anchor: Types_CompletionItem 170 | - title: CompletionItemType 171 | anchor: Types_CompletionItemType 172 | - title: DataBreakpoint 173 | anchor: Types_DataBreakpoint 174 | - title: DataBreakpointAccessType 175 | anchor: Types_DataBreakpointAccessType 176 | - title: DisassembledInstruction 177 | anchor: Types_DisassembledInstruction 178 | - title: ExceptionBreakMode 179 | anchor: Types_ExceptionBreakMode 180 | - title: ExceptionBreakpointsFilter 181 | anchor: Types_ExceptionBreakpointsFilter 182 | - title: ExceptionDetails 183 | anchor: Types_ExceptionDetails 184 | - title: ExceptionFilterOptions 185 | anchor: Types_ExceptionFilterOptions 186 | - title: ExceptionOptions 187 | anchor: Types_ExceptionOptions 188 | - title: ExceptionPathSegment 189 | anchor: Types_ExceptionPathSegment 190 | - title: FunctionBreakpoint 191 | anchor: Types_FunctionBreakpoint 192 | - title: GotoTarget 193 | anchor: Types_GotoTarget 194 | - title: InstructionBreakpoint 195 | anchor: Types_InstructionBreakpoint 196 | - title: InvalidatedAreas 197 | anchor: Types_InvalidatedAreas 198 | - title: Message 199 | anchor: Types_Message 200 | - title: Module 201 | anchor: Types_Module 202 | - title: Scope 203 | anchor: Types_Scope 204 | - title: Source 205 | anchor: Types_Source 206 | - title: SourceBreakpoint 207 | anchor: Types_SourceBreakpoint 208 | - title: StackFrame 209 | anchor: Types_StackFrame 210 | - title: StackFrameFormat 211 | anchor: Types_StackFrameFormat 212 | - title: StepInTarget 213 | anchor: Types_StepInTarget 214 | - title: SteppingGranularity 215 | anchor: Types_SteppingGranularity 216 | - title: Thread 217 | anchor: Types_Thread 218 | - title: ValueFormat 219 | anchor: Types_ValueFormat 220 | - title: Variable 221 | anchor: Types_Variable 222 | - title: VariablePresentationHint 223 | anchor: Types_VariablePresentationHint 224 | -------------------------------------------------------------------------------- /_implementors/adapters.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: implementors 3 | title: "Debug Adapters" 4 | shortTitle: "Debug Adapters" 5 | author: Microsoft 6 | index: 1 7 | --- 8 | 9 | The following table lists the known debug adapters that implement the Debug Adapter Protocol. You may find these useful as reference material when writing your own debug adapter, or for use in your editor of choice. 10 | 11 | Many adapters publish releases tailored for specific editors, such as VS Code, and some document how to run standalone DAP servers which can be used in any editor which supports them (in [IntelliJ](https://www.jetbrains.com/help/idea/configuring-third-party-tools.html) or [VS Code](https://code.visualstudio.com/api/extension-guides/debugger-extension#development-setup-for-mock-debug) for example). 12 | 13 | | Adapter | Maintainer | Usage | 14 | |---------|------------|-------| 15 | [Android](https://github.com/adelphes/android-dev-ext)|[@adelphes](https://github.com/adelphes)|[VS Code](https://marketplace.visualstudio.com/items?itemName=adelphes.android-dev-ext) 16 | [Apache Camel](https://github.com/camel-tooling/camel-debug-adapter)|[contributors](https://github.com/camel-tooling/camel-debug-adapter/graphs/contributors)|[VS Code](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-debug-adapter-apache-camel), [Eclipse](https://marketplace.eclipse.org/content/textual-debugging-apache-camel) 17 | [Apex](https://github.com/forcedotcom/salesforcedx-vscode)|[@ntotten](https://github.com/ntotten)|[VS Code](https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode-apex-debugger) 18 | [Ballerina](https://github.com/ballerina-platform/ballerina-lang/)|[Ballerina.io](https://ballerina.io/)|[VS Code](https://marketplace.visualstudio.com/items?itemName=wso2.ballerina) | 19 | [C/C++](https://github.com/Microsoft/vscode-cpptools)|[@WardenGnaw](https://github.com/WardenGnaw)|[VS Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) 20 | [C/C++/Rust](https://github.com/Marus/cortex-debug)|[@Marus](https://github.com/Marus)|[VS Code](https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug) 21 | [C/C++/Rust - Midas: gdb & rr](https://github.com/farre/midas)|[@theIDinside](https://github.com/theIDinside)|[VS Code](https://marketplace.visualstudio.com/items?itemName=farrese.midas) 22 | [C#](https://github.com/OmniSharp/omnisharp-vscode)|[@gregg-miskelly](https://github.com/gregg-miskelly)|[VS Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp) 23 | [Cobol](https://github.com/RechInformatica/rech-cobol-debugger)|[@RechInformatica](https://github.com/RechInformatica)|[VS Code](https://marketplace.visualstudio.com/items?itemName=rechinformatica.rech-cobol-debugger) 24 | [Cordova Tools](https://github.com/Microsoft/vscode-cordova)|[@MSLaguana](https://github.com/MSLaguana)|[VS Code](https://marketplace.visualstudio.com/items?itemName=vsmobile.cordova-tools) 25 | [Dart](https://github.com/dart-lang/sdk)|[@DanTup](https://github.com/DanTup) [@devoncarew](https://github.com/devoncarew)|[DAP Server](https://github.com/dart-lang/sdk/blob/master/pkg/dds/tool/dap/README.md), [VS Code](https://marketplace.visualstudio.com/items?itemName=Dart-Code.dart-code) 26 | [Debug](https://github.com/WebFreak001/code-debug)|[@WebFreak001](https://github.com/WebFreak001)|[VS Code](https://marketplace.visualstudio.com/items?itemName=webfreak.debug) 27 | [Debugger for Chrome](https://github.com/microsoft/vscode-chrome-debug)|[@roblourens](https://github.com/roblourens)|[VS Code](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) 28 | [Debugger for Edge](https://github.com/Microsoft/vscode-edge-debug2)|[@andysterland](https://github.com/andysterland)|[VS Code](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-edge) 29 | [Debugger for Electron](https://github.com/Kode/vscode-electron-debug)|[@Kode](https://github.com/Kode)|[VS Code](https://marketplace.visualstudio.com/items?itemName=kodetech.electron-debug) 30 | [Debugger for Firefox](https://github.com/hbenl/vscode-firefox-debug)|[@hbenl](https://github.com/hbenl)|[VS Code](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-firefox-debug) 31 | [Debugger for Krom](https://github.com/Kode/vscode-krom-debug)|[@Kode](https://github.com/Kode)|[VS Code](https://marketplace.visualstudio.com/items?itemName=kodetech.krom-debug) 32 | [Debugger for IBM enterprise COBOL for z/OS](https://github.com/BroadcomMFD/debugger-for-mainframe)|[@Broadcom](https://www.broadcom.com)|[VS Code](https://marketplace.visualstudio.com/items?itemName=broadcomMFD.debugger-for-mainframe) 33 | [Debugger for .NET Core](https://github.com/Samsung/netcoredbg)|[@ayuckhulk](https://github.com/ayuckhulk)|[DAP Server](https://github.com/Samsung/netcoredbg/blob/master/doc/cli.md) 34 | [Debugger for PhantomJS](https://github.com/iradul/vscode-phantomjs-debug)|[@iradul](https://github.com/iradul)|[VS Code](https://marketplace.visualstudio.com/items?itemName=iradul.debugger-for-phantomjs) 35 | [Debugger for Unity](https://github.com/Unity-Technologies/vscode-unity-debug)|[@lukaszunity](https://github.com/lukaszunity) [@miniwolf](https://github.com/miniwolf)|[VS Code](https://marketplace.visualstudio.com/items?itemName=Unity.unity-debug) 36 | [DeZog - Z80 Assembly Debugger](https://github.com/maziac/dezog)|[@maziac](https://github.com/maziac)|[VS Code](https://marketplace.visualstudio.com/items?itemName=maziac.dezog) 37 | [Duktape Debugger](https://github.com/svaarala/duktape)|[@svaarala](https://github.com/svaarala)|[VS Code](https://marketplace.visualstudio.com/items?itemName=HaroldBrenes.duk-debug) 38 | [Elixir](https://github.com/elixir-lsp/elixir-ls)|[Elixir LSP](https://github.com/elixir-lsp)|[VS Code](https://marketplace.visualstudio.com/items?itemName=JakeBecker.elixir-ls) 39 | [Emulicious Debugger](https://github.com/Calindro/emulicious-debugger)|[@Calindro](https://github.com/Calindro)|[VS Code](https://marketplace.visualstudio.com/items?itemName=emulicious.emulicious-debugger) 40 | [Erlang EDB](https://github.com/whatsapp/edb)|[@WhatsApp](https://github.com/WhatsApp)|[VS Code](https://marketplace.visualstudio.com/items?itemName=erlang-language-platform.erlang-language-platform) 41 | [Erlang LS Debugger](https://github.com/erlang-ls/erlang_ls)|[@robertoaloi](https://github.com/robertoaloi) and [Contributors](https://github.com/erlang-ls/erlang_ls/graphs/contributors)|[VS Code](https://marketplace.visualstudio.com/items?itemName=erlang-ls.erlang-ls) 42 | [ESP32 Debugger](https://github.com/espressif/esp-debug-adapter)|[@espressif](https://github.com/espressif)|[DAP Server](https://github.com/espressif/esp-debug-adapter#usage) 43 | [Firefox Remote Debug](https://github.com/yurydelendik/vscode-ff-debug)|[@yurydelendik](https://github.com/yurydelendik)|[VS Code](https://marketplace.visualstudio.com/items?itemName=yurydelendik.firefox-debug) 44 | [Flash](https://github.com/vshaxe/flash-debugger)|[@vshaxe](https://github.com/vshaxe/)|[VS Code](https://marketplace.visualstudio.com/items?itemName=vshaxe.haxe-debug) 45 | [Flutter](https://github.com/flutter/flutter)|[@DanTup](https://github.com/DanTup) [@devoncarew](https://github.com/devoncarew)|[DAP Server](https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/debug_adapters/README.md), [VS Code](https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter) 46 | [Go Delve Debugger](https://github.com/go-delve/delve/tree/master/service/dap)| [@polinasok](https://github.com/polinasok) and [Delve](https://github.com/go-delve)| [DAP Server](https://github.com/go-delve/delve/tree/master/Documentation/api/dap), [VS Code](https://github.com/golang/vscode-go/blob/master/docs/debugging.md) 47 | [Harbour](https://github.com/APerricone/harbourCodeExtension)|[@APerricone](https://github.com/APerricone)|[VS Code](https://marketplace.visualstudio.com/items?itemName=aperricone.harbour) 48 | [HashLink](https://github.com/vshaxe/hashlink-debugger)|[@vshaxe](https://github.com/vshaxe/)|[VS Code](https://marketplace.visualstudio.com/items?itemName=HaxeFoundation.haxe-hl) 49 | [Haskell GHCi debug viewer Phoityne](https://github.com/phoityne/phoityne-vscode)|[@phoityne](https://github.com/phoityne)|[VS Code](https://marketplace.visualstudio.com/items?itemName=phoityne.phoityne-vscode) 50 | [Haxe Eval](https://github.com/vshaxe/eval-debugger)|[@vshaxe](https://github.com/vshaxe/)|[VS Code](https://marketplace.visualstudio.com/items?itemName=nadako.vshaxe) 51 | [HXCPP](https://github.com/vshaxe/hxcpp-debugger)|[@vshaxe](https://github.com/vshaxe/)|[VS Code](https://marketplace.visualstudio.com/items?itemName=vshaxe.hxcpp-debugger) 52 | [Java Debugger](https://github.com/Microsoft/vscode-java-debug)|[@akaroml](https://github.com/akaroml)|[VS Code](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-debug) 53 | [JavaScript Debugger](https://github.com/microsoft/vscode-js-debug)|[@connor4312](https://github.com/connor4312)|[VS Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.js-debug) 54 | [JavaScript with Time-Traveling and Persistent State](https://github.com/awto/effectfuljs/tree/master/packages/vscode-debugger)|[@awto](https://github.com/awto)|[VS Code](https://marketplace.visualstudio.com/items?itemName=effectful.debugger) 55 | [JSIRDebugger](https://marketplace.visualstudio.com/items?itemName=muji.jsirdebugger)|muji 56 | [Karate](https://github.com/intuit/karate/tree/develop/karate-core/src/main/java/com/intuit/karate/debug)|[@kirk_slota](https://twitter.com/kirk_slota) [@ptrthomas](https://twitter.com/ptrthomas)|[VS Code](https://marketplace.visualstudio.com/items?itemName=kirkslota.karate-runner) 57 | [Kotlin](https://github.com/fwcd/kotlin-debug-adapter)|[@fwcd](https://github.com/fwcd)|[VS Code](https://marketplace.visualstudio.com/items?itemName=fwcd.kotlin) 58 | [LLDB Debugger](https://github.com/vadimcn/vscode-lldb)|[@vadimcn](https://github.com/vadimcn)|[VS Code](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) 59 | [lldb-dap](https://github.com/llvm/llvm-project/tree/main/lldb/tools/lldb-dap)|[@llvm](https://github.com/llvm)|[DAP Server](https://github.com/llvm/llvm-project/tree/main/lldb/tools/lldb-dap), [VS Code](https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.lldb-dap) 60 | [Lua and Ravi 5.3 Debugger](https://github.com/dibyendumajumdar/ravi-vscode-debugger)|[@dibyendumajumdar](https://github.com/dibyendumajumdar)|[VS Code](https://marketplace.visualstudio.com/items?itemName=ravilang.ravi-debug) 61 | [Lua Debug](https://github.com/actboy168/lua-debug)|[@actboy168](https://github.com/actboy168)|[VS Code](https://marketplace.visualstudio.com/items?itemName=actboy168.lua-debug) 62 | [Luau Debugger](https://github.com/sssooonnnggg/luau-debugger)|[@sssooonnnggg](https://github.com/sssooonnnggg)|[VS Code](https://marketplace.visualstudio.com/items?itemName=sssooonnnggg.luau-debugger) 63 | [Mock Debug](https://github.com/Microsoft/vscode-mock-debug)|[@roblourens](https://github.com/roblourens)|[VS Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.mock-debug) 64 | [Mono Debug](https://github.com/Microsoft/vscode-mono-debug)|[@akoeplinger](https://github.com/akoeplinger)|[VS Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.mono-debug) 65 | [NAME](https://github.com/utdscheld/name)|[John Cole](https://personal.utdallas.edu/~John.Cole/)| 66 | [NativeScript](https://github.com/NativeScript/nativescript-vscode-extension/)|[@ivanbuhov](https://github.com/ivanbuhov)|[VS Code](https://marketplace.visualstudio.com/items?itemName=Telerik.nativescript) 67 | [Node Debug](https://github.com/Microsoft/vscode-node-debug)|[@weinand](https://github.com/weinand)| 68 | [OCaml Earlybird](https://github.com/hackwaly/ocamlearlybird)|[@sim642](https://github.com/sim642)|[VS Code](https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform) 69 | [OneScript Debug](https://github.com/EvilBeaver/OneScript)|[@EvilBeaver](https://github.com/EvilBeaver)|[VS Code](https://marketplace.visualstudio.com/items?itemName=EvilBeaver.oscript-debug) 70 | [OpenQASM](https://github.com/quantag/qasm-adapter-vscode)|[@quantag](https://github.com/quantag)| 71 | [Papyrus](https://github.com/joelday/papyrus-debug-server)|[@joelday](https://github.com/joelday)|[VS Code](https://marketplace.visualstudio.com/items?itemName=joelday.papyrus-lang-vscode) 72 | [Perl Debug](https://github.com/Nihilus118/vscode-perl-debug)|[@Nihilus118](https://github.com/Nihilus118)|[VS Code](https://marketplace.visualstudio.com/items?itemName=Nihilus118.perl-debugger) 73 | [Perl::LanguageServer](https://github.com/richterger/Perl-LanguageServer)|[@richterger](https://github.com/richterger)|[VS Code](https://marketplace.visualstudio.com/items?itemName=richterger.perl) 74 | [Php](https://github.com/xdebug/vscode-php-debug)|[@zobo](https://github.com/zobo)|[VS Code](https://marketplace.visualstudio.com/items?itemName=xdebug.php-debug) 75 | [PowerShell](https://github.com/PowerShell/vscode-powershell)|[@daviwil](https://github.com/daviwil) [@rkeithhill](https://github.com/rkeithhill)|[VS Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell) 76 | [Puppet](https://github.com/lingua-pupuli/puppet-editor-services)|[@glennsarti](https://github.com/glennsarti) [@jpogran](https://github.com/jpogran)|[VS Code](https://marketplace.visualstudio.com/items?itemName=jpogran.puppet-vscode) 77 | [Python](https://github.com/Microsoft/vscode-python)|[@DonJayamanne](https://github.com/DonJayamanne)|[VS Code](https://marketplace.visualstudio.com/items?itemName=ms-python.python) 78 | [R Debugger](https://github.com/ManuelHentschel/VSCode-R-Debugger)|[@ManuelHentschel](https://github.com/ManuelHentschel)|[VS Code](https://marketplace.visualstudio.com/items?itemName=RDebugger.r-debugger) 79 | [React Native Tools](https://github.com/Microsoft/vscode-react-native/issues)|[@MSLaguana](https://github.com/MSLaguana)|[VS Code](https://marketplace.visualstudio.com/items?itemName=vsmobile.vscode-react-native) 80 | [Ruby LSP](https://github.com/Shopify/ruby-lsp)|[@Shopify](https://github.com/Shopify)|[VS Code](https://marketplace.visualstudio.com/items?itemName=Shopify.ruby-lsp) 81 | [Ruby Byebug](https://rubygems.org/gems/byebug-dap)|[Ethan Reesor](https://gitlab.com/firelizzard)| 82 | [Ruby Byebug (VSCode)](https://gitlab.com/firelizzard/vscode-byebug)|[Ethan Reesor](https://gitlab.com/firelizzard)|[VS Code](https://marketplace.visualstudio.com/items?itemName=ethan-reesor.vscode-byebug) 83 | [Rust (for embedded)](https://github.com/probe-rs/vscode)|[probe.rs community](https://github.com/probe-rs)|[VS Code](https://probe.rs/docs/tools/vscode/), [Eclipse](https://marketplace.eclipse.org/content/eclipse-corrosion-rust-editing-and-debugging) 84 | [Scala](https://github.com/scalacenter/scala-debug-adapter)|[@adpi2](https://github.com/adpi2)|[SBT](https://index.scala-lang.org/scalacenter/scala-debug-adapter) 85 | [Squirrel](https://github.com/samisalreadytaken/sqdbg)|[@samisalreadytaken](https://github.com/samisalreadytaken)| 86 | [SWI-Prolog](https://github.com/eshelyaron/debug_adapter)|[@eshelyaron](https://github.com/eshelyaron)|[SWI and Emacs](https://github.com/eshelyaron/debug_adapter#installation) 87 | [SWF](https://github.com/BowlerHatLLC/vscode-nextgenas)|[@joshtynjala](https://github.com/joshtynjala)|[VS Code](https://marketplace.visualstudio.com/items?itemName=bowlerhatllc.vscode-nextgenas) 88 | [TLA+](https://github.com/tlaplus/vscode-tlaplus)|[@lemmy](https://github.com/lemmy)|[VS Code](https://marketplace.visualstudio.com/items?itemName=alygin.vscode-tlaplus-nightly) 89 | [VDM-SL, VDM++, VDM-RT](https://github.com/nickbattle/vdmj/tree/master/lsp)|[@nickbattle](https://github.com/nickbattle)|[VS Code](https://marketplace.visualstudio.com/items?itemName=jonaskrask.vdm-vscode) 90 | [VSCode rdbg Ruby Debugger](https://github.com/ruby/vscode-rdbg)|[@ko1](https://github.com/ko1)|[VS Code](https://marketplace.visualstudio.com/items?itemName=KoichiSasada.vscode-rdbg) 91 | [Wolfram Language](https://github.com/kenkangxgwe/lsp-wl?tab=readme-ov-file#debug-adapter-features)|[@kenkangxgwe](https://github.com/kenkangxgwe/lsp-wl)|[VS Code](https://marketplace.visualstudio.com/items?itemName=lsp-wl.lsp-wl-client) 92 | {: .table .table-bordered .table-responsive} 93 | 94 | *If you are missing a debug adapter implementation please create a pull request in GitHub against this markdown [document](https://github.com/Microsoft/debug-adapter-protocol/blob/main/_implementors/adapters.md)* 95 | -------------------------------------------------------------------------------- /_implementors/sdks.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: implementors 3 | title: "SDKs for the DAP" 4 | shortTitle: "SDKs" 5 | author: Microsoft 6 | index: 3 7 | --- 8 | 9 | The following table lists the known SDKs or libraries that support the Debug Adapter Protocol. 10 | 11 | | Description | Language | Maintainer | Repository | 12 | |---------------|------------|------------|------------| 13 | | Libraries for implementing and testing debug adapters (npm modules) | TypeScript | Microsoft | [vscode-debugadapter-node](https://github.com/Microsoft/vscode-debugadapter-node) 14 | | Managed implementation for hosting and implementing debug adapters (nuget package) | C#/.NET | Microsoft | [VisualStudio.Shared.VsCodeDebugProtocol](https://www.nuget.org/packages/Microsoft.VisualStudio.Shared.VsCodeDebugProtocol) 15 | | Extensibility interfaces for a DAP host (nuget package) | C#/.NET | Microsoft | [VisualStudio.Debugger.DebugAdapterHost.Interfaces](https://www.nuget.org/packages/Microsoft.VisualStudio.Debugger.DebugAdapterHost.Interfaces/) 16 | | Sample for integrating debug adapters in Visual Studio | C#/.NET | Microsoft | [Microsoft/VSDebugAdapterHost](https://github.com/Microsoft/VSDebugAdapterHost) 17 | | Libraries for implementing debug adapters on JVM | Java | Eclipse Foundation | [eclipse/lsp4j](https://github.com/eclipse/lsp4j) 18 | | C++ library for implementing debug adapters | C++ | Google | [google/cppdap](https://github.com/google/cppdap) 19 | | Ruby library for encoding and decoding DAP messages | Ruby | [Ethan Reesor](https://gitlab.com/firelizzard) | [firelizzard/ruby-dap](https://gitlab.com/firelizzard/ruby-dap) 20 | | Go library for DAP | Go | Go team at Google | [google/go-dap](https://github.com/google/go-dap) 21 | | A Rust implementation of the Debug Adapter Protocol | Rust | [Tamás Szelei](https://github.com/sztomi) | [sztomi/dap-rs](https://github.com/sztomi/dap-rs) 22 | {: .table .table-bordered .table-responsive} 23 | 24 | *If you are missing a SDK please create a pull request in GitHub against this markdown [document](https://github.com/Microsoft/debug-adapter-protocol/blob/main/_implementors/sdks.md)* 25 | -------------------------------------------------------------------------------- /_implementors/tools.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: implementors 3 | title: "Tools supporting the DAP" 4 | shortTitle: "Supporting Tools" 5 | author: Microsoft 6 | index: 2 7 | --- 8 | 9 | The following table lists the known development tools (IDEs) that implement the Debug Adapter Protocol as a client. 10 | 11 | | Development Tool | Client ID | Maintainer | Repository | 12 | |-------------------------------|--------------|------------|-------------------------------------------| 13 | | Visual Studio Code | vscode | Microsoft | [vscode](https://github.com/Microsoft/vscode) 14 | | Visual Studio | visualstudio | Microsoft | [Visual Studio Debug Adapter Host](https://github.com/Microsoft/VSDebugAdapterHost) 15 | | Visual Studio for Mac | vsformac | Microsoft | 16 | | Eclipse IDE (LSP4E connector) | lsp4e.debug | Eclipse | [Eclipse community](https://projects.eclipse.org/projects/technology.lsp4e/who), [Eclipse LSP4E](https://projects.eclipse.org/projects/technology.lsp4e) 17 | | Emacs | emacs.dap-mode | [@yyoncho](https://github.com/yyoncho) | [dap-mode](https://github.com/yyoncho/dap-mode) 18 | | Emacs | dape | [@svaante](https://github.com/svaante) | [dape](https://github.com/svaante/dape) 19 | | ecode | ecode | [Martín Lucas Golini](https://github.com/SpartanJ) | [ecode](https://github.com/SpartanJ/ecode) 20 | | Theia | Theia | Eclipse | [theia](https://github.com/theia-ide/theia/) 21 | | Vim, Neovim | vimspector | [Ben Jackson](https://github.com/puremourning) | [vimspector](https://github.com/puremourning/vimspector), [vim](https://github.com/vim/vim), [neovim](https://github.com/neovim/neovim) 22 | | Neovim | neovim | [@mfussenegger](https://github.com/mfussenegger) | [nvim-dap](https://github.com/mfussenegger/nvim-dap), [neovim](https://github.com/neovim/neovim) 23 | | Cloud Studio | cloudstudio | [CODING](https://studio.dev.tencent.com/) 24 | | JCIDE | JCIDE | [JavaCardOS](https://www.javacardos.com/) | [JCIDE](https://www.javacardos.com/tools) 25 | | OpenSumi | OpenSumi | [OpenSumi](https://github.com/opensumi) | [opensumi/core](https://github.com/opensumi/core) 26 | | IntelliJ (LSP4IJ DAP support) | lsp4ij.debug | Red Hat | [IntelliJ LSP4IJ](https://github.com/redhat-developer/lsp4ij/blob/main/docs/dap/UserGuide.md) | 27 | {: .table .table-bordered .table-responsive} 28 | 29 | The "client ID" is the identifier that a development tool sends to the debug adapter as part of the [**initialize**](../../specification#Requests_Initialize) request. 30 | 31 | *If you are missing a development tool or if you want to register a client ID please create a pull request in GitHub against this markdown [document](https://github.com/Microsoft/debug-adapter-protocol/blob/main/_implementors/tools.md).* 32 | -------------------------------------------------------------------------------- /_includes/cookie_notice.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_includes/footer.html: -------------------------------------------------------------------------------- 1 | 47 | -------------------------------------------------------------------------------- /_includes/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /_includes/js_files.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /_includes/topnav.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% include head.html %} 5 | 6 | 7 | {% include cookie_notice.html %} 8 | {% include topnav.html %} 9 | 10 |
11 |
12 | {{ content }} 13 |
14 |
15 | 16 | {% include footer.html %} 17 | {% include js_files.html %} 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /_layouts/implementors.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
6 |
7 |
8 |
9 | 19 |
20 |
21 | 22 | 37 | 38 |
39 | 40 |
41 |
42 |
43 | -------------------------------------------------------------------------------- /_layouts/singlePage.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
6 |
7 |
8 |
9 |
10 |

{{ page.title }}

11 |
{{ content }}
12 |
13 |
14 |
15 |
16 |
-------------------------------------------------------------------------------- /_layouts/specification.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
6 |
7 |
8 |
9 | 10 | 42 | 43 |
44 | {% for toc-l1 in site.data.specification-toc %} 45 |
46 |
47 | {% for toc-l2 in toc-l1.children %} 48 |
49 | 50 | {{ toc-l2.title }} 51 | 52 |
53 | 62 |
63 |
64 | {% endfor %} 65 |
66 |
67 | {% endfor %} 68 |
69 |
70 |
71 | -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Change Log 3 | layout: singlePage 4 | sectionid: changelog 5 | --- 6 | 7 | #### All notable changes to the specification will be documented in this file. 8 | 9 | * 1.70.x 10 | * Clarify how `StackTraceArguments.format` applies 11 | * Clarify the default behavior of `ContinuedEvent.allThreadsContinued` 12 | 13 | * 1.69.x 14 | * Clarify the flow diagram to start a debug session 15 | * Add `supportsANSIStyling` capabilities to allow colorization of text from debug adapters 16 | 17 | * 1.68.x 18 | * Add `locationReference`s to Variable-related data types to allow navigation to declarations, and a corresponding `locations` request. 19 | * Clarify the meaning of "system process" 20 | * Clarify the lifetime of `variableReference`s after a `setVariable` call 21 | * Fix typographic errors in `StackFrame.canRestart` 22 | 23 | * 1.67.x 24 | * Add `line`, `column`, and `source` location attributions to `EvaluateArguments` 25 | * Add `returnValue` as a well-known `Scope.presentationHint` 26 | 27 | * 1.66.x 28 | * Add `bytes` and `asAddress` properties to the `DataBreakpointInfo` request 29 | 30 | * 1.65.x 31 | * Clarify handling of multiple filters in the `SetExceptionBreakpoints` request 32 | * Clarify lifetimes of objects created outside of suspended states 33 | * Add a `BreakpointMode` for setting different types of breakpoints 34 | 35 | * 1.64.x 36 | * Clarify that the `offset` in the `InstructionBreakpoint` is given in bytes 37 | * Add a `presentationHint` to the `DisassembledInstruction` 38 | * Add a `reason` to the `Breakpoint` to indicate why verification may have failed 39 | 40 | * 1.63.x 41 | * Add `memoryReference` support to the `SetVariableResponse`/`SetExpressionResponse` 42 | * Fix a typo in the description of `BreakpointLocationsArguments` 43 | * Fix missing line break in `CancelRequest` 44 | * Clarify `memoryReference` in `Variable` type 45 | * Clarify state of "object ID"s in `VariablePresentationHint` 46 | 47 | * 1.62.x 48 | * Clarify lifetime of `DataBreakpoint.dataId` 49 | 50 | * 1.61.x 51 | * Removed unused `ModulesViewDescriptor` interface 52 | * Clarify the applicability of `supportsVariablePaging` 53 | * Fix mention of non-existent `hitCondition` in `SetExceptionBreakpointsResponse` 54 | 55 | * 1.60.x 56 | * Clarify the usage of `hitCondition` and `logMessage` in `SetBreakpointsRequest` 57 | 58 | * 1.59.x: 59 | * Add an optional `frameId` to the `DataBreakpointInfoRequest` 60 | * Add `notStopped` as a well-known reason in `Response` 61 | * Clarify the lifetime of `variablesReference`. 62 | * Clarify the default behavior when `kind` is omitted from the `RunInTerminalRequest`. 63 | * Clarify end of file behavior for `readMemory`. 64 | 65 | * 1.58.x: 66 | * Specify the measurement unit of various `column` and "character positions" properties to be "UTF-16 code units". 67 | 68 | * 1.57.x: 69 | * Add the `argsCanBeInterpretedByShell` property to the `RunInTerminalRequest` 70 | 71 | * 1.56.x: 72 | * Add additional information to the `StepInTarget` 73 | * Clarification around wording for "clients" 74 | * Clarification around "falsey" in `CompletionItem.text` 75 | * Specify checksums to be given a hexadecimal strings, and timestamps as RFC 3339 date strings 76 | * Make wording on source.origin more clear to be non-exhaustive 77 | 78 | * 1.55.x: 79 | * Improved descriptions for `terminate` and `disconnect` requests. 80 | * Add missing value `variables` to the `context` argument of the `evaluate`request. 81 | * Fix a mistake in the description of the `ExceptionFilterOptions` type. 82 | 83 | * 1.54.x: 84 | * Add a new boolean property `lazy` on the `VariablePresentationHint`. Clients can use that flag to present the variable with a UI that supports a specific gesture to trigger its evaluation. 85 | 86 | * 1.53.x: 87 | * Add a new `detail` property on the CompletionItem 88 | 89 | * 1.52.x: 90 | * clarify comment for `Variable.value`. 91 | 92 | * 1.51.x: 93 | * Add a new category `important` to the `output` event. This is a hint for clients to show the message with a highly visible UI. 94 | * Clarify the description of all execution control requests (`continue`, `next`, `stepIn`, `stepOut`, `stepBack`, `reverseContinue`) 95 | * Add a new capability `supportsSingleThreadExecutionRequests` to indicate that the execution control requests support the `singleThread` property. 96 | * Add a new optional `singleThread` property to all execution control requests. 97 | 98 | * 1.49.x: 99 | * Add `memory` event and a corresponding **client** capability `supportsMemoryEvent`. 100 | 101 | * 1.48.x: 102 | * Add guidance for the case that a debug adapter implements both `setVariable` and `setExpression` and clients need to decide which request to use. 103 | * Add `writeMemory` request and a corresponding `supportsWriteMemoryRequest` capability. 104 | 105 | * 1.47.x: 106 | * The `setExceptionBreakpoints` can now optionally return an array of `Breakpoint`s as the other `setXxxxBreakpoints` do. This allows clients to show validation error messages for individual exception breakpoints or filters. 107 | * The `restart` request got a new optional parameter `arguments` where a client can pass the latest version of a launch or attach configuration. 108 | * Adds a new optional argument `suspendDebuggee` to the `disconnect` request. If a debug adapter has opted into this feature with the `supportSuspendDebuggee` capability, a client can use this to control whether the debuggee should be suspended when the debugger is disconnected. 109 | 110 | * 1.46.x: 111 | * Add an optional attribute `hitBreakpointIds` to the `stopped` event which contains the ids of the breakpoints that triggered the event. 112 | 113 | * 1.45.x: 114 | * Add new UI attribute `description` and `conditionDescription` to the `ExceptionBreakpointsFilter`. With these clients can display additional information about exception breakpoints. 115 | * Improved description for `setExceptionBreakpoints` request by adding guidance for what an adapter should do if the user inputs an invalid exception breakpoint condition. 116 | * Add new optional boolean property `canRestart` to the stack frame. It indicated whether the stack frame can be restarted with the `restart`request. 117 | 118 | * 1.44.x: 119 | * Deprecated the value `dataBreakpoint` of `VariablePresentationHint.kind`. Instead a new value `hasDataBreakpoint` has been added to the `VariablePresentationHint.attribute`. 120 | 121 | * 1.43.x: 122 | * Add support for conditional exceptions. With this the `setExceptionBreakpoints` request got a new property `filterOptions` for setting the exception filters and their conditions. The corresponding capability is `supportsExceptionFilterOptions`. 123 | * Clarify the description of the `stackTrace` request and its `totalFrames` property. 124 | * Clarify the description of the `cwd` property of the `runInTerminal` request: a client is only expected to execute a change directory command if `cwd` contains a non-empty, valid path. 125 | 126 | * 1.42.x: 127 | * Add `invalidated` event and a corresponding **client** capability `supportsInvalidatedEvent`. 128 | 129 | * 1.41.x: 130 | * Add "stepping granularity" support for the stepping requests `next`, `stepIn`, `stepOut`, `stepBack` and a corresponding **client** capability `supportsSteppingGranularity`. 131 | * Add instruction breakpoints and a corresponding **client** capability `supportsInstructionBreakpoints`. 132 | 133 | * 1.40.x: 134 | * New value `clipboard` for `context` argument of `evaluate` request. 135 | * Add support for reporting progress via `progressStart`, `progressUpdate`, and `progressEnd` events and a corresponding **client** capability `supportsProgressReporting`. Progress can be cancelled via a new `progressId` argument for the `cancel` request. 136 | * Clarified descriptions of all optional requests, events, and attributes to make clear what is the corresponding capability. 137 | 138 | * 1.39.x: 139 | * Add optional `selectionStart` and `selectionLength` attributes to completion item. With these attributes the selection range or position can be controlled after the completion text has been inserted. 140 | * Add optional `group` attribute to `output` event in order to keep an output log organized by grouping related messages. 141 | 142 | * 1.38.x: 143 | * Fixes some typos and improves some comments. 144 | 145 | * 1.37.x: 146 | * Adds a `breakpointLocations` request (and a corresponding `supportsBreakpointLocationsRequest` capability) for finding the possible breakpoints for a source range. 147 | * Adds cancellation support for requests via a new `cancel` request and a corresponding `supportsCancelRequest` capability. 148 | * Improves some comments. 149 | 150 | * 1.36.x: 151 | * Introduces a capability `completionTriggerCharacters` for announcing the characters that a frontend UI should use to trigger completion. 152 | * Adds an optional `sortText` attribute to the `CompletionItem` type. 153 | * In the schema change "number" to "integer" in cases where a float makes no sense, e.g. for IDs. 154 | 155 | * 1.35.x: 156 | * Adds an optional `presentationHint` attribute to the `Scope` type which can be used to add semantic to the scope's contents. An example is to mark a scope as a "registers" scope that contains "registers" instead of variables. 157 | * Adds experimental support for memory access via a new `readMemory` request and a corresponding `supportsReadMemoryRequest` capability. 158 | * Adds experimental support for memory disassembly via a new `disassemble` request and a corresponding `supportsDisassembleRequest` capability. 159 | 160 | * 1.34.x: 161 | * Adds support for data breakpoints via the 'dataBreakpointInfo' and 'setDataBreakpoints' requests and the 'supportsDataBreakpoints' capability. 162 | * Improves some comments. 163 | 164 | * 1.33.x: 165 | * Point out that the breakpoint's `id` attribute is mandatory when `breakpoint` events are used. 166 | * Return a new attribute `shellProcessId` from the `runInTerminal` request. 167 | 168 | * 1.32.x: 169 | * Adds an optional boolean argument `restart` to the `terminate` and `disconnect` requests. The value `true` indicates that the `terminate` or `disconnect` request is part of a restart sequence. 170 | * Move specification to DAP web site. 171 | 172 | * 1.31.x: 173 | * Adds a new optional `terminate` request which can be used to give a debuggee the chance to shutdown gracefully. A corresponding `supportsTerminateRequest` capability announces that an adapter implements the request. 174 | 175 | * 1.30.x: 176 | * Comment cosmetics. 177 | 178 | * 1.29.x: 179 | * Adds a new value for the 'reason' attribute of the 'stopped' event. This is used when an adapter implements the 'goto' request. 180 | 181 | * 1.28.x: 182 | * Adds an optional attribute `clientName` to the `Initialize` request. This makes it possible to surface the human readable name of the client in error messages coming from the adapter. 183 | * Adds a `terminateThreads` request and a corresponding `supportsTerminateThreadsRequest` capability. 184 | * Made the `__restart` attribute official on the `launch` or `attach` requests. It corresponds to the `restart` attribute on the `terminated` event. 185 | * Adds a `setExpression` request and a corresponding `supportsSetExpression` capability. This request can be used to assign a value to an assignable expression (aka "l-value"). 186 | * Adds a new optional `preserveFocusHint` to the `stopped` event. A value of true hints to the frontend that this event should not change the focus. 187 | 188 | * 1.27.x: 189 | * Adds a new `capabilities` event that hints to the frontend that one or more capabilities got updated. 190 | * Initial support for logPoints: new attribute `SourceBreakpoint.logMessage` and capability `supportsLogPoint`. 191 | 192 | * 1.26.x: 193 | no protocol changes 194 | 195 | * 1.25.x: 196 | * Adds a new enum value `virtual` for the `presentationHint` attribute of type `Variable`. 197 | * To remove env variables from the environment support a 'null' value for `env` attribute in `runInTerminal` request. 198 | 199 | * 1.24.x: 200 | * Adds `removed` to the value set of the `reason` attribute of the `BreakpointEvent`. 201 | * Adds a `locale` attribute to the `initialize` request. The adapter can use this information to translate user visible information. 202 | 203 | * 1.23.x: 204 | * Adds a `source`, `line`, and `column` attributes to the `Output` event. With this a frontend can show a link to the source where the output was generated. 205 | * Adds support for retrieving loaded scripts and receiving loaded script events (`LoadedSourcesRequest`, `LoadedSourceEvent`). 206 | * Adds display hints for variables and evaluation results (type `VariablePresentationHint`). 207 | 208 | * 1.22.x: 209 | * Adds a new enum value `normal` for the `presentationHint` attribute of type `Source`. 210 | * Adds a new event `process` that conveys process ID and other information about the debuggee. 211 | 212 | * 1.21.x: 213 | * Adds optional attribute `includeAll` to type `StackFrameFormat`. With this the `StackTraceRequest` can be parameterized to include all stack frames, including those the DA might otherwise hide. 214 | * Adds capability `supportsDelayedStackTraceLoading` that indicates that a debug adapter supports the delayed loading of parts of the stack. This requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `StackTraceRequest` are supported. 215 | 216 | * 1.20.x: 217 | * Extends the type of the `TerminatedEvent.body.restart` attribute from `boolean` to `any`. This makes it possible to loop arbitrary data from one debug session to the next. 218 | * Adds a new enum value `subtle` for the `presentationHint` attribute of type `StackFrame`. 219 | 220 | * 1.19.x: 221 | * Adds a new optional argument `terminateDebuggee` to the `disconnect` request. If a debug adapter has opted into this feature with the 'supportTerminateDebuggee' capability, a client can use this to control whether the debuggee should be terminated when the debugger is disconnected. 222 | 223 | * 1.18.x: 224 | * Adds optional attribute `source` to the `SourceArguments`. 225 | * Made StoppedEvent's `reason` attribute robust against translation by introducing a new `description` attribute. 226 | * Add a new optional attribute `presentationHint` to the `StackFrame` type. This attribute can be used to control how the frame is rendered in the UI. 227 | 228 | * 1.17.x: 229 | * Adds optional attribute `clientID` to the `InitializeRequestArguments`. 230 | * Adds support for obtaining exception details: `ExceptionInfoRequest`, `ExceptionDetails`. 231 | * Adds optional parameter `format` to the `SetVariableRequest`. 232 | 233 | * 1.16.x: 234 | * Updated comments for `path` and `sourceReference` attributes of `Source` type (the frontend no longer needs to have a notion of 'internal' modules; it just loads the content of a Source either through the sourceReference or the path). 235 | * Adds optional `presentationHint` attribute to `Source` type. This allows to control how the frontend shows a source reference in th UI. 236 | * Removed `SHA1Normalized`and `SHA256Normalized` values from type `ChecksumAlgorithm`. 237 | 238 | * 1.15.x: 239 | * Adds a `reverseContinue` request. 240 | * Adds a `restart` request and a corresponding `supportsRestartRequest` capability. 241 | * Adds a `variablesReference` attribute to the `OutputEvent`. 242 | * Adds support for exception configuration options. 243 | * Adds formatting options support for values returned from `VariablesRequest`, `EvaluateRequest`, and `StackTraceRequest`. 244 | 245 | * 1.14.x: 246 | * Adds optional `type` attribute to the `SetVariableResponse` type. 247 | * Support to return a structured object from the `SetVariableRequest`. 248 | * Fine tuning of `Module` part of the protocol. 249 | * Adds optional attribute `evaluatable` to `Variable` type. 250 | * Adds optional checksum support to `Source` type. 251 | * Adds optional source range to `Scope` type. 252 | 253 | * 1.13.x: 254 | * Fix typo in `Capabilities` type. 255 | * Adds an optional `hitCondition` attribute to breakpoints and a corresponding `supportsHitConditionalBreakpoints`capability. 256 | 257 | * 1.12.x: 258 | * Adds a new optional attribute `frameId` to the `completionRequest`. 259 | * Introduces a `runInTerminalRequest` so that a debug adapter can run a debuggee in a terminal managed by the frontend. 260 | * Adds a `type` attribute (and a value set) to the `CompletionItem`. 261 | 262 | * 1.11.x: 263 | * Adds a new optional attribute `mimeType` to the `SourceResponse`. 264 | * Adds a new optional attribute `sourceModified` to the `SetBreakpointsArguments` that indicates that the underlying source has been modified which results in new breakpoint locations. 265 | * Adds a new optional attribute `supportsVariableType` to `InitializeRequestArguments`. True indicates that the client shows the variable's type attribute in the UI. 266 | * Adds optional 'type' attribute to the `EvaluateResponse`. 267 | * Introduces the `RestartFrameRequest` and a corresponding `supportsRestartFrame` capability. 268 | * Introduces a `ContinuedEvent` so that a debug adapter can explicit trigger that a thread has continued execution. 269 | * Adds support for step in targets (request `StepInTargetsRequest`, type `StepInTarget`, capability `supportsStepInTargetsRequest`) 270 | * Adds support for goto targets (requests `GotoTargetsRequest` and `GotoRequest`, type `GotoTarget`, capability `supportsGotoTargetsRequest`) 271 | * Adds support for variable paging, that is named and indexed children of a variable can be requested in pages (chunks). 272 | * Adds experimental support for completion proposals. 273 | 274 | * 1.10.x: 275 | * Introduces a `stepBack` request and a corresponding `supportsStepBack` capability. 276 | * Introduces the type `Module`, a `ModuleRequest`, and a `ModuleEvent` 277 | * Introduces the `setVariableRequest` 278 | * Adds new optional attributes `type` and `kind` for a `Variable`. 279 | * Adds optional attributes `endLine` and `endColumn` to `StackFrame` and `Breakpoint` types. 280 | 281 | * 1.9.x: 282 | * Introduces a `allThreadsContinued` attribute on the `ContinueResponse` to indicate that all threads are continued and not only the one specified. 283 | 284 | * 1.8.x: 285 | * Introduces `ExceptionBreakpointsFilter` and fixed corresponding capability. 286 | * Adds optional `noDebug` attribute to `LaunchRequestArguments`. 287 | * Adds optional `startFrame` argument to `StackTraceArguments` to allow for paging. 288 | * Adds optional `totalFrames` argument to `StackTraceResponse` to allow for paging. 289 | * Improve comment: `InitializedEvent` must not be sent before `InitializeRequest` has returned its result. 290 | 291 | * 1.7.x: 292 | * Adds optional `url` and `urlLabel` attributes to the error messages. The frontend will show this as a UI to open additional information in a browser. 293 | * Added option `default` attribute to the `exceptionBreakpointFilters` capability. 294 | * Adds optional attribute `allThreadsStopped` to the `StoppedEvent` to indicate that all threads are stopped (and not only the one mentioned in the event). 295 | 296 | * 1.6.x: 297 | * A boolean `supportsConditionalBreakpoints` in `Capabilities` indicates whether the debug adapter supports conditional breakpoints. 298 | * Adds an optional `exceptionBreakpointFilters` capability that lists the filters available for the `setExceptionBreakpoints` request. 299 | * Adds an optional `restart` attribute to the `TerminatedEvent` which can be used to request a restart of the debug session. 300 | 301 | * 1.5.x: 302 | * A boolean `supportsFunctionBreakpoints` in `Capabilities` indicates whether the debug adapter implements the function breakpoints. 303 | * Renamed `supportEvaluateForHovers` in `Capabilities` to `supportsEvaluateForHovers`. 304 | 305 | * 1.4.x: 306 | * Made the `body` of the `InitializeResponse` optional (for backward compatibility). 307 | 308 | * 1.3.x: Version introduces support for feature negotiation. 309 | * The `InitializeResponse` has now attributes for these features: 310 | * A boolean `supportsConfigurationDoneRequest` indicates whether the debug adapter implements the `ConfigurationDoneRequest`. 311 | * A boolean `supportEvaluateForHovers` indicates whether the debug adapter supports a side effect free `EvaluateRequest`. 312 | * Adds an optional `data` attribute to the `OutputEvent` and a `telemetry` category. 313 | * Adds a new context type `hover` to the `context` attribute of the `EvaluateArguments`. 314 | 315 | * 1.2.x: Version adds a new request: 316 | * Introduces a `ConfigurationDoneRequest` that VS Code sends to indicate that the configuration of the debug session has finished and that debugging can start. 317 | 318 | * 1.1.x: Version adds support for conditional breakpoints and breakpoints in virtual documents: 319 | * Type `Source` supports optional `origin` attribute to provide information that is shown in the debug UI. 320 | * Type `Source` supports an optional `adapterData` attribute that the VS Code debug UI will transparently persists for breakpoints. 321 | * Introduces type `SourceBreakpoint` that makes it possible to provide `column` and `condition` information when specifying a breakpoint. 322 | 323 | * 1.0.1: Initial version of the debug protocol 324 | -------------------------------------------------------------------------------- /contributing.md: -------------------------------------------------------------------------------- 1 | # How to Contribute to the Debug Adapter Protocol 2 | 3 | TBD 4 | 5 | ## Releasing DAP Changes 6 | 7 | This section describes how changes in the Debug Adapter Protocol are released; informational for most readers, and instructional for maintainers. 8 | 9 | DAP versions are synchronized to [VS Code's iterations](https://github.com/microsoft/vscode/wiki/Development-Process), with a minor release being cut about every month. All DAP changes for an iteration are committed to the `main` branch which is merged into the `gh-pages` branch in endgame week. 10 | 11 | We also maintain npm packages containing the [DAP types](https://www.npmjs.com/package/@vscode/debugprotocol) and a [Node.js adapter](https://www.npmjs.com/package/@vscode/debugadapter) and a [test support library](https://www.npmjs.com/package/@vscode/debugadapter-testsupport). Typically we update those three libraries whenever we change DAP (and commit to the `main` branch) so that interested stakeholders can try out latest DAP changes early. Since changes are considered to be "unofficial" until released to the `gh-pages` branch, we publish the three npm modules as a ["pre-release version"](https://semver.org/#spec-item-9) first, e.g. with a version number like `1.53.0-pre.1`. 12 | 13 | Detailed steps: 14 | 15 | 1. After discussion on the Github issue has come to a conclusion (typically with an agreed upon API proposal in TypeScript), update `debugAdapterProtocol.json` with the corresponding schema changes. 16 | 1. Add an entry in `changelog.md`. If this is the first change of the iteration, add a new new section header with the upcoming version number, e.g. `* 1.53.X:` and bump the version number in `index.html` to the same number. The version number can be found in the sentence: `The latest version of the protocol specification is version 1.53.0.` 17 | 1. Run `node spec-generator` (after `npm install && npm run compile` in the subdirectory) to automatically update the documentation. Commit it to the `main` branch. 18 | 1. If this is a feature that VS Code would want to implement, open a corresponding issue in the VS Code repo. 19 | 1. Updating the npm modules: 20 | 1. Whenever there are worthwhile DAP changes, pull the updated DAP schema by running `npm run sync-dap` or `npm run sync-next-dap` and run the `Generate debugProtocol.ts` launch configuration to update the `DebugProtocol` TypeScript module. 21 | 1. Run `./bump-version.sh preminor --preid pre` in the repo, which will create a prerelease tag and a branch named `release/`rece. 22 | 1. Create a PR for the release branch. Once merged, packages will get automatically published by CI. 23 | 1. Adopt the three new npm modules in [Mock Debug](https://github.com/microsoft/vscode-mock-debug) to verify that they still work. 24 | 1. Commit and push the version changes to Mock Debug. 25 | 1. At the end of each VS Code iteration (typically Wednesday of endgame week), publish the final version of the three npm packages by running `./bump-version.sh minor` with steps 2-4 again. 26 | -------------------------------------------------------------------------------- /css/main.scss: -------------------------------------------------------------------------------- 1 | --- 2 | # Only the main Sass file needs front matter (the dashes are enough) 3 | --- 4 | @charset "utf-8"; 5 | 6 | img[alt=without_DAP] { width: 60%; height: 60%; } 7 | img[alt=with_DAP] { width: 75%; height: 75%; } 8 | img[alt=init-launch] { width: 80%; height: 80%; } 9 | img[alt=stop-continue-terminate] { width: 80%; height: 80%; } 10 | img[alt=breakpoint] { width: 80%; height: 80%; } 11 | 12 | html { 13 | position: relative; 14 | min-height: 100%; 15 | } 16 | 17 | body { 18 | letter-spacing: .25px; 19 | text-rendering: optimizeLegibility; 20 | color: #242628; 21 | } 22 | 23 | .single-page { 24 | padding: 40px 0; 25 | } 26 | 27 | .bg-primary { 28 | background-color: #2753e3 !important; 29 | } 30 | 31 | .header-container { 32 | color: #fff; 33 | 34 | @media (min-width: 576px) { 35 | margin-bottom: 80px; 36 | } 37 | 38 | h1 { 39 | margin-top: 15px; 40 | font-weight: bold; 41 | } 42 | 43 | .intro { 44 | text-align: center; 45 | } 46 | 47 | .intro-text { 48 | margin: 0 auto; 49 | max-width: 450px; 50 | text-align: center; 51 | } 52 | } 53 | 54 | h2 { 55 | margin-bottom: 20px; 56 | } 57 | 58 | .toc { 59 | font-size: 85% 60 | } 61 | 62 | .toc-title { 63 | padding-left: 0.5rem 64 | } 65 | 66 | .toc-h1 { 67 | padding-top: 0.5rem; 68 | padding-left: 0.5rem; 69 | margin-bottom: 0; 70 | } 71 | 72 | .toc-link { 73 | padding: 0.125rem 0.5rem; 74 | color: #707070 75 | } 76 | 77 | .anchor { 78 | display: block; 79 | } 80 | 81 | pre[class=highlight] { 82 | padding: 9.5px; 83 | overflow: auto; 84 | font-size: 85%; 85 | line-height: 1.45; 86 | background-color: #f6f8fa; 87 | border: 1px solid #ccc; 88 | border-radius: 4px; 89 | background: #f6f8fa 90 | } 91 | 92 | .highlight .hll { 93 | background-color: #EFEFEF 94 | } 95 | 96 | .highlight .c { 97 | color: #525151 98 | } 99 | 100 | .highlight .err { 101 | color: #525151 102 | } 103 | 104 | .highlight .k { 105 | color: #8959A8 106 | } 107 | 108 | .highlight .l { 109 | color: #85450A 110 | } 111 | 112 | .highlight .n { 113 | color: #525151 114 | } 115 | 116 | .highlight .o { 117 | color: #545454 118 | } 119 | 120 | .highlight .p { 121 | color: #525151 122 | } 123 | 124 | .highlight .cm { 125 | color: #525151 126 | } 127 | 128 | .highlight .cp { 129 | color: #525151 130 | } 131 | 132 | .highlight .c1 { 133 | color: #525151 134 | } 135 | 136 | .highlight .cs { 137 | color: #525151 138 | } 139 | 140 | .highlight .gd { 141 | color: #C82829 142 | } 143 | 144 | .highlight .ge { 145 | font-style: italic 146 | } 147 | 148 | .highlight .gh { 149 | color: #545454; 150 | font-weight: bold 151 | } 152 | 153 | .highlight .gi { 154 | color: #5B7201 155 | } 156 | 157 | .highlight .gp { 158 | color: #5B7201; 159 | font-weight: bold 160 | } 161 | 162 | .highlight .gs { 163 | font-weight: bold 164 | } 165 | 166 | .highlight .gu { 167 | color: #3E999F; 168 | font-weight: bold 169 | } 170 | 171 | .highlight .kc { 172 | color: #8959A8 173 | } 174 | 175 | .highlight .kd { 176 | color: #8959A8 177 | } 178 | 179 | .highlight .kn { 180 | color: #3E999F 181 | } 182 | 183 | .highlight .kp { 184 | color: #4271AE 185 | } 186 | 187 | .highlight .kr { 188 | color: #8959A8 189 | } 190 | 191 | .highlight .kt { 192 | color: #EAB700 193 | } 194 | 195 | .highlight .ld { 196 | color: #5B7201 197 | } 198 | 199 | .highlight .m { 200 | color: #85450A 201 | } 202 | 203 | .highlight .s { 204 | color: #5B7201 205 | } 206 | 207 | .highlight .na { 208 | color: #4271AE 209 | } 210 | 211 | .highlight .nb { 212 | color: #4271AE 213 | } 214 | 215 | .highlight .nc { 216 | color: #EAB700 217 | } 218 | 219 | .highlight .no { 220 | color: #EAB700 221 | } 222 | 223 | .highlight .nd { 224 | color: #3E999F 225 | } 226 | 227 | .highlight .ni { 228 | color: #545454 229 | } 230 | 231 | .highlight .ne { 232 | color: #C82829 233 | } 234 | 235 | .highlight .nf { 236 | color: #4271AE 237 | } 238 | 239 | .highlight .nl { 240 | color: #545454 241 | } 242 | 243 | .highlight .nn { 244 | color: #EAB700 245 | } 246 | 247 | .highlight .nx { 248 | color: #4271AE 249 | } 250 | 251 | .highlight .py { 252 | color: #545454 253 | } 254 | 255 | .highlight .nt { 256 | color: #3E999F 257 | } 258 | 259 | .highlight .nv { 260 | color: #C82829 261 | } 262 | 263 | .highlight .ow { 264 | color: #3E999F 265 | } 266 | 267 | .highlight .w { 268 | color: #545454 269 | } 270 | 271 | .highlight .mf { 272 | color: #85450A 273 | } 274 | 275 | .highlight .mh { 276 | color: #85450A 277 | } 278 | 279 | .highlight .mi { 280 | color: #85450A 281 | } 282 | 283 | .highlight .mo { 284 | color: #85450A 285 | } 286 | 287 | .highlight .sb { 288 | color: #5B7201 289 | } 290 | 291 | .highlight .sc { 292 | color: #545454 293 | } 294 | 295 | .highlight .sd { 296 | color: #525151 297 | } 298 | 299 | .highlight .s2 { 300 | color: #5B7201 301 | } 302 | 303 | .highlight .se { 304 | color: #85450A 305 | } 306 | 307 | .highlight .sh { 308 | color: #5B7201 309 | } 310 | 311 | .highlight .si { 312 | color: #85450A 313 | } 314 | 315 | .highlight .sx { 316 | color: #5B7201 317 | } 318 | 319 | .highlight .sr { 320 | color: #5B7201 321 | } 322 | 323 | .highlight .s1 { 324 | color: #5B7201 325 | } 326 | 327 | .highlight .ss { 328 | color: #5B7201 329 | } 330 | 331 | .highlight .bp { 332 | color: #545454 333 | } 334 | 335 | .highlight .vc { 336 | color: #C82829 337 | } 338 | 339 | .highlight .vg { 340 | color: #C82829 341 | } 342 | 343 | .highlight .vi { 344 | color: #C82829 345 | } 346 | 347 | .highlight .il { 348 | color: #85450A 349 | } 350 | 351 | .more-info { 352 | padding: 100px 0; 353 | 354 | p { 355 | padding: 0; 356 | } 357 | } 358 | 359 | .footer { 360 | padding: 15px 0; 361 | color: #000; 362 | background: #e9ecef; 363 | 364 | @media (min-width: 576px) { 365 | padding: 50px 0; 366 | } 367 | 368 | img { 369 | width: 100px; 370 | } 371 | 372 | a#footer-microsoft-link { 373 | display: block; 374 | } 375 | 376 | ul { 377 | margin: 0; 378 | padding: 0; 379 | } 380 | 381 | .github-button-container { 382 | vertical-align: middle; 383 | } 384 | 385 | .message { 386 | display: inline-block; 387 | padding-right: 10px; 388 | } 389 | 390 | .links { 391 | padding-bottom: 10px; 392 | 393 | @media (min-width: 576px) { 394 | padding: 0; 395 | } 396 | 397 | li { 398 | list-style: none; 399 | padding-bottom: 10px; 400 | 401 | @media (min-width: 576px) { 402 | display: inline-flex; 403 | padding: 0; 404 | } 405 | } 406 | } 407 | 408 | iframe { 409 | position: relative; 410 | top: 5px; 411 | } 412 | } 413 | 414 | @media (min-width: 992px) { 415 | .dap-navbar { 416 | position: -webkit-sticky; 417 | position: sticky; 418 | top: 0; 419 | z-index: 1071; 420 | } 421 | 422 | .dap-sidebar { 423 | position: -webkit-sticky; 424 | position: sticky; 425 | top: 100px; 426 | z-index: 1000; 427 | height: calc(100vh - 110px); 428 | overflow: auto; 429 | } 430 | 431 | h3 .anchor, h4 .anchor, h5 .anchor { 432 | scroll-margin-top: 60px; 433 | } 434 | } 435 | 436 | @media (max-width: 991px) { 437 | .dap-sidebar { 438 | margin-top: 1rem; 439 | margin-bottom: 1rem; 440 | } 441 | } 442 | 443 | .dap-sidebar .card { 444 | padding-top: 1px; 445 | } 446 | 447 | .navbar-brand h1 { 448 | font-size: 18px; 449 | font-weight: bold; 450 | margin: 0; 451 | } 452 | 453 | .nav .nav-link:hover { 454 | color: #1034a8 !important; 455 | } 456 | 457 | a { 458 | color: #216fc9; 459 | } 460 | 461 | a h3 { 462 | padding-top: 2px; 463 | padding-bottom: 2px; 464 | } 465 | 466 | .navbar-dark .navbar-nav .nav-link:hover { 467 | color: rgba(255, 255, 255, 0.75); 468 | } 469 | 470 | .navbar-dark .navbar-nav .nav-link { 471 | color: white; 472 | } 473 | 474 | .docs-nav { 475 | h4 { 476 | display: inline-block; 477 | font-size: 14px; 478 | } 479 | } 480 | -------------------------------------------------------------------------------- /diagrams/build.mjs: -------------------------------------------------------------------------------- 1 | import { execSync, spawnSync } from 'child_process'; 2 | import fs from 'fs/promises'; 3 | import path from 'path'; 4 | import { fileURLToPath } from 'url'; 5 | 6 | const dirname = path.dirname(fileURLToPath(import.meta.url)); 7 | const files = await fs.readdir(dirname); 8 | const outDir = path.resolve(dirname, '../img'); 9 | for (const file of files) { 10 | if (file.endsWith('.mmd')) { 11 | console.log(`==== Processing ${file}`); 12 | const result = spawnSync('mmdc', ['-i', file, '-o', path.join(outDir, path.basename(file, '.mmd') + '.svg')], { 13 | stdio: 'inherit', 14 | shell: true, 15 | env: { 16 | PATH: process.env.PATH + path.delimiter + path.resolve(dirname, 'node_modules/.bin'), 17 | } 18 | }); 19 | if (result.error) { 20 | throw result.error; 21 | } 22 | if (result.status !== 0) { 23 | process.exit(result.status); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /diagrams/init-launch.mmd: -------------------------------------------------------------------------------- 1 | sequenceDiagram 2 | participant User 3 | participant Host as Client 4 | 5 | User->>Host: start debugging 6 | activate Host 7 | 8 | create participant DA as Debug Adapter 9 | Host->>DA: start debug adapter 10 | Host->>DA: initialize request 11 | activate DA 12 | create participant Debugger 13 | DA->>Debugger: start gdb 14 | DA->>Host: response: capabilities 15 | deactivate DA 16 | 17 | 18 | par Client configures the adapter after `initialized` 19 | DA-->>+Host: initialized event 20 | Host->>+DA: setBreakpoints request 21 | DA->>Debugger: break 'hello.c:main:4' 22 | DA->>-Host: response: breakpoints 23 | 24 | Host->>+DA: setExceptionBreakpoints request 25 | DA->>Debugger: catch 26 | DA->>-Host: response: status 27 | 28 | Host->>+DA: configurationDone request 29 | DA->>-Host: response: status 30 | deactivate Host 31 | and Client issues a launch request after receiving capabilities 32 | Host->>DA: launch request 33 | activate DA 34 | end 35 | 36 | 37 | DA->>Debugger: file 'a.out' 38 | DA->>Debugger: run 39 | DA->>Host: response: status 40 | deactivate DA 41 | -------------------------------------------------------------------------------- /diagrams/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "build": "node build.mjs" 4 | }, 5 | "dependencies": { 6 | "@mermaid-js/mermaid-cli": "^11.2.0" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /diagrams/stop-continue-terminate.mmd: -------------------------------------------------------------------------------- 1 | sequenceDiagram 2 | participant Host as Development Tool 3 | participant DA as Debug Adapter 4 | participant Debugger 5 | 6 | Debugger-->>DA: stopped 'hello.c:main:4' 7 | activate DA 8 | DA-->>Host: stopped event 9 | deactivate DA 10 | activate Host 11 | 12 | Host->>DA: threads request 13 | activate DA 14 | DA->>Debugger: threads 15 | DA->>Host: response: threads 16 | deactivate DA 17 | 18 | Host->>DA: stacktrace request 19 | activate DA 20 | DA->>Debugger: backtrace 21 | DA->>Host: response: stack frames 22 | deactivate DA 23 | 24 | Host->>DA: scopes request 25 | activate DA 26 | DA->>Host: response: scopes 27 | deactivate DA 28 | 29 | Host->>DA: variables request 30 | activate DA 31 | DA->>Debugger: select-frame 1 32 | DA->>Debugger: info variables 33 | DA->>Host: response: variables 34 | deactivate DA 35 | deactivate Host 36 | 37 | Host->>DA: continue request 38 | activate Host 39 | activate DA 40 | DA->>Debugger: c 41 | DA->>Host: response: status 42 | deactivate DA 43 | deactivate Host 44 | 45 | destroy Debugger 46 | Debugger->>DA: exited 47 | activate DA 48 | DA-->>+Host: terminated event 49 | activate Host 50 | destroy DA 51 | deactivate DA 52 | DA-->>Host: exited event 53 | deactivate Host 54 | -------------------------------------------------------------------------------- /img/breakpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/img/breakpoint.png -------------------------------------------------------------------------------- /img/init-launch.svg: -------------------------------------------------------------------------------- 1 | DebuggerDebug AdapterClientUserDebuggerDebug AdapterClientUserpar[Client configures the adapter after`initialized`][Client issues a launch request after receivingcapabilities]start debuggingstart debug adapterinitialize requeststart gdbresponse: capabilitiesinitialized eventsetBreakpoints requestbreak 'hello.c:main:4'response: breakpointssetExceptionBreakpoints requestcatchresponse: statusconfigurationDone requestresponse: statuslaunch requestfile 'a.out'runresponse: status -------------------------------------------------------------------------------- /img/java-threads.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/img/java-threads.png -------------------------------------------------------------------------------- /img/microsoft-logo-inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/img/microsoft-logo-inverted.png -------------------------------------------------------------------------------- /img/microsoft-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/img/microsoft-logo.png -------------------------------------------------------------------------------- /img/node-repl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/img/node-repl.gif -------------------------------------------------------------------------------- /img/python-inline-values.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/img/python-inline-values.gif -------------------------------------------------------------------------------- /img/stop-continue-terminate.svg: -------------------------------------------------------------------------------- 1 | DebuggerDebug AdapterDevelopment ToolDebuggerDebug AdapterDevelopment Toolstopped 'hello.c:main:4'stopped eventthreads requestthreadsresponse: threadsstacktrace requestbacktraceresponse: stack framesscopes requestresponse: scopesvariables requestselect-frame 1info variablesresponse: variablescontinue requestcresponse: statusexitedterminated eventexited event -------------------------------------------------------------------------------- /img/with-DAP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/img/with-DAP.png -------------------------------------------------------------------------------- /img/without-DAP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/img/without-DAP.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | 6 | 7 | 8 |
9 |
10 |
11 |

Debug Adapter Protocol

12 |
13 |

14 | The Debug Adapter Protocol (DAP) defines the abstract protocol used between a development tool (e.g. IDE or editor) and a debugger. 15 |

16 | 17 |
18 |
19 | Star 21 |
22 |
23 |
24 | 25 |
26 |
27 | 43 |
44 | 72 |
73 |
74 | 75 |
76 | 77 |
78 |
79 |

80 |

Overview

81 |

82 | The protocol defines the format of the messages sent using JSON between the development tool and the debug adapter. 83 |

84 |
85 |
86 |

87 |

Specification

88 |

89 | The latest version of the protocol specification is version 1.70.0. 90 |

91 |

92 | Change History 93 |

94 |
95 |
96 |

97 | {% assign sorted = site.implementors | sort: 'index' %} 98 |

Implementations

99 |

100 | The DAP has been implemented for many debuggers or runtimes and some development tools are hosting these debug adapters. 101 |

102 |
103 |
104 |
105 | -------------------------------------------------------------------------------- /js/page.js: -------------------------------------------------------------------------------- 1 | $('#small-nav-dropdown').change(function() { 2 | window.location = $(this) 3 | .find('option:selected') 4 | .val() 5 | }) 6 | 7 | const site_tag = 'UA-62780441-30'; 8 | function loadAnalytics(gtag) { 9 | // set cookie to expire in 12 x 28 days 10 | gtag('config', site_tag, { 'anonymize_ip': true, 'cookie_expires': 29030400 }) 11 | } 12 | 13 | function onConsentChanged() { 14 | function gtag() { 15 | window.dataLayer.push(arguments) 16 | } 17 | 18 | if (!consentRequired() || WcpConsent.siteConsent.getConsentFor(WcpConsent.consentCategories.Analytics)) { 19 | // Load GA 20 | loadAnalytics(gtag) 21 | } 22 | } 23 | 24 | function consentRequired() { 25 | return WcpConsent.siteConsent.isConsentRequired; 26 | } 27 | 28 | $(function() { 29 | // Load GA upfront because we classify it as essential cookie 30 | window.dataLayer = window.dataLayer || [] 31 | function gtag() { 32 | dataLayer.push(arguments) 33 | } 34 | gtag('js', new Date()) 35 | 36 | window.WcpConsent && WcpConsent.init("en-US", "cookie-banner", function (err, _siteConsent) { 37 | }, onConsentChanged, WcpConsent.themes.light); 38 | 39 | const cookieManager = document.querySelector('#footer-cookie-link'); 40 | if (consentRequired() && cookieManager && cookieManager.parentElement) { 41 | cookieManager.parentElement.style.visibility = 'visible'; 42 | } 43 | 44 | // initialize consent 45 | onConsentChanged(); 46 | }) -------------------------------------------------------------------------------- /overview.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Overview 3 | layout: singlePage 4 | sectionid: overview 5 | --- 6 | 7 | ## What is the Debug Adapter Protocol? 8 | 9 | It takes a significant effort to implement the UI for a new debugger for features like: 10 | - source-, function-, conditional-, and inline breakpoints, 11 | - variable values shown in hovers or inlined in the source, 12 | - multi-process and multi-thread support, 13 | - navigating through complex data structures, 14 | - watch expressions, 15 | - debug console for interactive evaluation with autocomplete (aka REPL), 16 | - log points. 17 | 18 | Typically this work must be repeated for each development tool, as each tool uses different APIs for implementing its user interface. 19 | This results in lots of duplicated functionality (and implementation) as visualized by the blue boxes in the following picture: 20 | 21 | ![without_DAP](./img/without-DAP.png) 22 | 23 | The idea behind the _Debug Adapter Protocol_ is to standardize an abstract protocol for how a development tool communicates with concrete debuggers. 24 | 25 | A similar approach was already [introduced in 2016](https://code.visualstudio.com/blogs/2016/06/27/common-language-protocol) with the [_Language Server Protocol_](https://microsoft.github.io/language-server-protocol/) which standardized an abstract protocol between an editor or IDE and a server providing "language smartness." 26 | 27 | Since it is unrealistic to assume that existing debuggers or runtimes adopt this protocol any time soon, 28 | we rather assume that an _intermediary_ component takes over the role of adapting an existing debugger or runtime API to the Debug Adapter Protocol. 29 | This intermediary becomes the _Debug Adapter_ which explains the name of the protocol: _Debug Adapter Protocol_. 30 | The following picture shows the resulting architecture: 31 | 32 | ![with_DAP](./img/with-DAP.png) 33 | 34 | The diagram shows that the Debug Adapter Protocol makes it possible to implement a single generic debugger UI per development tool 35 | and that Debug Adapters can be re-used across these tools. This reduces the effort to support a new debugger considerably. 36 | 37 | Standardizing on a wire-protocol instead of an API and a client library has the advantage that a debug adapter can be implemented in the language most suitable for the given debugger or runtime. 38 | 39 | Since the _Debug Adapter Protocol_ was designed for supporting the debugging UI in a language agnostic way, 40 | it is fairly high-level and does not have to surface all the fine details of the underlying language and low-level debugger API. 41 | The most important data type used in the protocol are strings, because that's what the end user will see in the UI. 42 | So Debug Adapters typically aggregate information received via debugger APIs into high-level, string-based data-structures that are directly consumed in the UI of the development tool. 43 | Since this mapping is mostly straightforward and has little complexity, Debug adapters can be developed with minimal effort. 44 | 45 | The _Debug Adapter Protocol_ is a win for both debugger/runtime providers and tooling vendors! 46 | 47 | ## How it works 48 | 49 | The following sections explain the interaction between a development tool (e.g. IDE or editor) and a debug adapter. 50 | This should not only help when implementing the Debug Adapter Protocol in a debug adapter, but also when _hosting_ the protocol in a development tool (sometimes also called "host" or "client"). 51 | 52 | ### Debug Session Start 53 | 54 | When a debug session starts, the development tool needs a way to communicate with the debug adapter that implements the Debug Adapter Protocol. 55 | How the debug adapter comes to life is not part of the protocol specification, but it is still an important detail if debug adapters should work across different development tools. 56 | 57 | A development tool has basically two ways of interacting with a debug adapter: 58 | - **single session mode**: in this mode, the development tool starts a debug adapter as a standalone process and communicates with it through *stdin* and *stdout*. At the end of the debug session the debug adapter is terminated. For concurrent debug sessions, the development tool starts multiple debug adapters. 59 | - **multi session mode**: in this mode, the development tool does not start the debug adapter but assumes that it is already running and that it listens on a specific port for connections attempts. For every debug session, the development tool initiates a new communication session on a specific port and disconnects at the end of the session. 60 | 61 | After establishing a connection to the debug adapter, the development tool starts communicating with the adapter via the _base protocol_. 62 | 63 | ### Base protocol 64 | 65 | The base protocol exchanges messages that consist of a header and a content part (comparable to HTTP). 66 | The header and content part are separated by a `\r\n` (carriage return, line feed). 67 | 68 | #### Header Part 69 | 70 | The header part consists of header fields. Each header field is comprised of a key and a value, separated by ': ' (a colon and a space). 71 | Each header field is terminated by `\r\n`. 72 | 73 | Since both the last header field and the overall header itself are each terminated with `\r\n`, 74 | and since the header is mandatory, the content part of a message is always preceded (and uniquely identified) by two `\r\n` sequences. 75 | 76 | Currently only a single header field is supported and required: 77 | 78 | | Header Field Name | Value Type | Description | 79 | |:------------------|:------------|:------------| 80 | | Content-Length | number | The length of the content part in bytes. This header is required. | 81 | {: .table .table-bordered .table-responsive} 82 | 83 | The header part is encoded using the 'ASCII' encoding. This includes the `\r\n` separating the header and content part. 84 | 85 | #### Content Part 86 | 87 | The content part contains the actual content of the message. The content part of a message uses JSON to describe [requests](./specification#Base_Protocol_Request), [responses](./specification#Base_Protocol_Response), and [events](./specification#Base_Protocol_Event). 88 | 89 | The content part is encoded using `utf-8`. 90 | 91 | `integer`s defined in the protocol (JSON schema type `integer`) may be represented as 32 bit signed integers, although some properties disallow negative values. `number`s in the protocol (JSON schema type `number`) may be represented as 64 bit floating point numbers. 92 | 93 | #### Example: 94 | 95 | This example shows the JSON for the DAP [next](./specification#Requests_Next) request: 96 | 97 | ``` 98 | Content-Length: 119\r\n 99 | \r\n 100 | { 101 | "seq": 153, 102 | "type": "request", 103 | "command": "next", 104 | "arguments": { 105 | "threadId": 3 106 | } 107 | } 108 | ``` 109 | 110 | ### Initialization 111 | 112 | The Debug Adapter Protocol defines many features and this number is still growing, albeit slowly. 113 | However, the protocol is still at its first version because it was an explicit design goal to support new feature in a completely backward compatible way. 114 | Making this possible without version numbers requires that every new feature gets a corresponding flag that lets a development tool know whether a debug adapter supports the feature or not. The absence of the flag always means that the feature is not supported. 115 | 116 | A single feature and its corresponding flag is called a "capability" in the Debug Adapter Protocol. The open-ended set of all features flags is called DAP's "capabilities." 117 | 118 | When starting a debug session, the development tool sends an [**initialize**](./specification#Requests_Initialize) request to the adapter in order to exchange capabilities between the development tool and the debug adapter. 119 | 120 | The development tool capabilities are provided in the [**InitializeRequestArguments**](./specification#Types_InitializeRequestArguments) structure of the [**initialize**](./specification#Requests_Initialize) request and typically start with the prefix `supports`. 121 | Other pieces of information passed from the tool to the debug adapter are: 122 | - the name of the development tool, 123 | - the format of file paths, `native` or `uri`, 124 | - whether line and column values are 0 or 1 based, 125 | - the locale used by the development tool. A debug adapter is expected to return error messages that honor this locale. 126 | 127 | The debug adapter returns the supported capabilities in the [**InitializeResponse**](./specification#Types_InitializeResponse) via the [**Capabilities**](./specification#Types_Capabilities) type. 128 | It is not necessary to return an explicit `false` for unsupported capabilities. 129 | 130 | ### Launching and attaching 131 | 132 | After the debug adapter has been initialized, it is ready to accept requests for starting debugging. 133 | Two requests exist for this: 134 | - [**launch**](./specification#Requests_Launch) request: the debug adapter launches the program ("debuggee") in debug mode and then starts to communicate with it. 135 | Since the debug adapter is responsible for launching the debuggee, it should provide a mechanism for the end user to configure the debuggee. For example, passing arguments or specifying a working directory. 136 | - Debug adapters are free to launch the debuggee however they choose. Typically the debuggee is launched as a child process and its output channels are connected to a client's debug console via [**output**](./specification.md#Events_Output) events. However, this has certain limitations, such as not being able to write to the terminal device directly and not being able to accept standard input. For those cases, launching the debuggee in a terminal is preferable. A debug adapter can use the [**runInTerminal**](./specification#Reverse_Requests_RunInTerminal) request to ask the client to launch the debuggee in a terminal that is integrated into the client or in a terminal that runs outside of the client (but still configured and managed from the client). 137 | - [**attach**](./specification#Requests_Attach) request: the debug adapter connects to an already running program. Here the end user is responsible for launching and terminating the program. 138 | 139 | Since arguments for both requests are highly dependent on a specific debugger and debug adapter implementation, the Debug Adapter Protocol does not specify any arguments for these requests. 140 | Instead, the development tool is expected to get information about debugger specific arguments from elsewhere (e.g. contributed by some plugin or extension mechanism) 141 | and to build a UI and validation mechanism on top of that. 142 | 143 | ### Configuring breakpoint and exception behavior 144 | 145 | Since the development tool implements a generic debugger UI, it is responsible for managing breakpoints and other configurable options like exceptions. 146 | This configuration information must be passed to the debug adapter before program execution starts. 147 | Some debuggers are able to deal with this information very early, even before the debuggee is known; other debuggers accept this information only when the debuggee is about to start running. 148 | 149 | Since the development tool does not know when is the correct moment for passing the configuration information to the adapter, 150 | the debug adapter is expected to send an [**initialized**](./specification#Events_Initialized) event to the development tool 151 | to announce that it is ready to accept configuration requests. 152 | With this approach a debug adapter does not have to implement a buffering strategy for configuration information. 153 | 154 | In response to the *initialized* event, the development tool sends the configuration information using these requests: 155 | * [**setBreakpoints**](./specification#Requests_SetBreakpoints) one request for all breakpoints in a single source, 156 | * [**setFunctionBreakpoints**](./specification#Requests_SetFunctionBreakpoints) if the debug adapter supports function breakpoints, 157 | * [**setExceptionBreakpoints**](./specification#Requests_SetExceptionBreakpoints) if the debug adapter supports any exception options, 158 | * [**configurationDoneRequest**](./specification#Requests_ConfigurationDone) to indicate the end of the configuration sequence. 159 | 160 | The *setBreakpoints* request registers all breakpoints that exist for a single source (so it is not incremental). 161 | A simple implementation of these semantics in the debug adapter is to clear all previous breakpoints for the source and then set the breakpoints specified in the request. 162 | *setBreakpoints* and *setFunctionBreakpoints* are expected to return the 'actual' breakpoints and the generic debugger updates the UI dynamically if a breakpoint could not be set at the requested position or was moved by the debugger. 163 | 164 | If a debug adapter is unable to apply a breakpoint at the time when it's first sent, it should mark the breakpoint as unverified using `verified: false` in the `SetBreakpointsResponse`. If the breakpoint changes its state at a later point in time, the debug adapter should use the [**breakpoint**](./specification#Events_Breakpoint) event to notify the client. 165 | 166 | ### Launch Sequencing 167 | 168 | There are three main building blocks we've discussed to create a debugging session: 169 | 170 | - Initialization, via the `initialize` request, 171 | - Configuration of breakpoints and exceptions during the configuration stage, and 172 | - Starting the debugger, via a launch or attach request. 173 | 174 | Initialization happens first, and the debug adapter must respond to the `initialize` request with any capabilities before any further communication can take place. At any point after the client receives the capabilities, it sends a `launch` or `attach` request. 175 | 176 | Once the debug adapter is ready to receive configuration from the client, it sends an `initialized` event to the client. As described above, the client sends zero or more configuration-related requests before sending a `configurationDone` request. 177 | 178 | After the response to `configurationDone` is sent, the debug adapter may respond to the `launch` or `attach` request, and then the debug session has started. 179 | 180 | The following sequence diagram summarizes the sequence of requests and events for a hypothetical _gdb_ debug adapter: 181 | 182 | Sequence diagram of the launch flow 183 | 184 | ### Stopping and accessing debuggee state 185 | 186 | Whenever the program stops (on program entry, because a breakpoint was hit, an exception occurred, or the user requested execution to be paused), 187 | the debug adapter sends a [**stopped**](./specification#Events_Stopped) event with the appropriate reason and thread id. 188 | 189 | Upon receipt, the development tool first requests the [`threads`](./specification#Types_Thread) (see below) and then the *stacktrace* (a list of [`stack frames`](./specification#Types_StackFrame)) for the thread mentioned in the stopped event. 190 | If the user then drills into the stack frame, the development tool first requests the [`scopes`](./specification#Types_Scope) for a stack frame, and then the [`variables`](./specification#Types_Variable) for a scope. 191 | If a variable is itself structured, the development tool requests its properties through additional *variables* requests. 192 | This leads to the following request waterfall: 193 | 194 | ``` 195 | Threads 196 | StackTrace 197 | Scopes 198 | Variables 199 | ... 200 | Variables 201 | ``` 202 | 203 | The value of variables can be modified through the [**setVariable**](./specification#Requests_SetVariable) request. 204 | 205 | #### Lifetime of Objects References 206 | 207 | Some complex structural objects such as [`scopes`](./specification#Types_Scope) or [`variables`](./specification#Types_Variable) are not returned directly with their containers ([`stack frames`](./specification#Types_StackFrame), [`scopes`](./specification#Types_Scope), [`variables`](./specification#Types_Variable)), but must be retrieved with separate [**scopes**](./specification#Requests_Scopes) and [**variables**](./specification#Requests_Variables) requests based on *object references*. An object reference is an integer in the open interval (0, 231) assigned to objects by the debug adapter. 208 | 209 | To simplify the management of object references in debug adapters, their lifetime is limited to the current suspended state. Once execution resumes, object references become invalid and DAP clients must not use them. When execution is paused again, object references no longer refer to the same objects. This means that a debug adapter can easily use sequentially assigned integers for different objects and reset the counter to 1 when execution resumes. 210 | 211 | Variable references not related to the current suspended state, such as those from `evaluate` requests or in `output` events, should be preserved as long as feasible for the debug adapter so that the client may later inspect them. 212 | 213 | Please note that other object references like `threadId` do not have limited lifetime because that would prevent something like the `pause` request from working in the running state. 214 | 215 | ### Supporting threads 216 | 217 | Whenever the generic debugger receives a [**stopped**](./specification#Events_Stopped) or a [**thread**](./specification#Events_Thread) event, the development tool requests all [`threads`](./specification#Types_Thread) that exist at that point in time. [**Thread**](./specification#Events_Thread) events are optional, but a debug adapter can send them to force the development tool to update the threads UI dynamically even when not in a stopped state. If a debug adapter decides not to emit [**Thread**](./specification#Events_Thread) events, the thread UI in the development tool will only update if a [**stopped**](./specification#Events_Stopped) event is received. 218 | 219 | After a successful *launch* or *attach*, the development tool requests the baseline of currently existing threads with the [**threads**](./specification#Requests_Threads) request and then starts to listen for [**thread**](./specification#Events_Thread) events to detect new or terminated threads. Even if a debug adapter does not support multiple threads, it must implement the [**threads**](./specification#Requests_Threads) request and return a single (dummy) thread. The thread id must be used in all requests which refer to a thread, e.g. [**stacktrace**](./specification#Requests_Stacktrace), [**pause**](./specification#Requests_Pause), [**continue**](./specification#Requests_Continue), [**next**](./specification#Requests_Next), [**stepIn**](./specification#Requests_StepIn), and [**stepOut**](./specification#Requests_StepOut). 220 | 221 | ### Debug session end 222 | 223 | When the development tool ends a debug session, the sequence of events is slightly different based on whether the session has been initially "launched" or "attached": 224 | 225 | - Debuggee **_launched_**: 226 | if a debug adapter supports the [**terminate**](./specification#Requests_Terminate) request, the development tool uses it to terminate the debuggee gracefully, i.e. it gives the debuggee a chance to cleanup everything before terminating. If the debuggee does not terminate but continues to run (or hits a breakpoint), the debug session will continue, but if the development tool tries again to terminate the debuggee, it will then use the [**disconnect**](./specification#Requests_Disconnect) request to end the debug session unconditionally. The *disconnect* request is expected to terminate the debuggee (and any child processes) forcefully. 227 | - Debuggee **_attached_**: 228 | If the debuggee has been "attached" initially, the development tool issues a [**disconnect**](./specification#Requests_Disconnect) request. This should detach the debugger from the debuggee but will allow it to continue. 229 | 230 | In all situations where a debug adapter wants to end the debug session, a [**terminated**](./specification#Events_Terminated) event must be fired. 231 | 232 | If the debuggee has ended (and the debug adapter is able to detect this), an optional [**exited**](./specification#Events_Exited) event can be issued to return the exit code to the development tool. 233 | 234 | This diagram summarizes the sequence of request and events for a hypothetical debug adapter for _gdb_: 235 | 236 | Sequence diagram of the termination flow 237 | 238 | ## Libraries (SDKs) for DAP providers and consumers 239 | 240 | To simplify the implementation of debug adapters, there are libraries or SDKs: 241 | 242 | - *Debug Adapter SDKs* for the different implementation languages there is an SDK to implement a debug adapter in a particular language. For example, to implement a debug adapter using Node.js there is the [debug adapter npm module](https://www.npmjs.com/package/@vscode/debugadapter). 243 | -------------------------------------------------------------------------------- /spec-generator/generator.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | 'use strict'; 6 | 7 | import * as fs from 'fs'; 8 | import {IProtocol, Protocol as P} from './json_schema'; 9 | 10 | const MAX_LINE_LENGTH = 80; 11 | 12 | class OutlineNode { 13 | 14 | private children: OutlineNode[] = []; 15 | public readonly anchor: string; 16 | 17 | constructor( 18 | parent: OutlineNode, 19 | private title: string 20 | ) { 21 | if (parent) { 22 | parent.children.push(this); 23 | let a = title; 24 | if (parent.anchor) { 25 | a = `${parent.anchor}_${title}`; 26 | } 27 | this.anchor = a.replace(/ /g, '_'); 28 | } 29 | } 30 | 31 | dump(level = 0): string { 32 | let outline = ''; 33 | const indent = ' '.repeat(level); 34 | outline += `${indent}- title: ${this.title}\n`; 35 | if (this.anchor) { 36 | outline += `${indent} anchor: ${this.anchor}\n`; 37 | } 38 | if (this.children.length > 0) { 39 | this.children = this.children.sort((a, b) => a.title.localeCompare(b.title)); 40 | outline += `${indent} children:\n`; 41 | for (let c of this.children) { 42 | outline += c.dump(level+1); 43 | } 44 | } 45 | return outline; 46 | } 47 | } 48 | 49 | //---- Markdown ------------------------------------------------------------------------------------ 50 | 51 | function MarkDown(schema: IProtocol): string { 52 | 53 | let s = ''; 54 | 55 | s += '---\n'; 56 | s += 'title: Specification\n'; 57 | s += 'layout: specification\n'; 58 | s += 'sectionid: specification\n'; 59 | s += 'toc: true\n'; 60 | s += `schemaTitle: ${schema.title}\n`; 61 | s += '---\n\n'; 62 | 63 | s += '\n\n'; 64 | s += Header(1, schema.title); 65 | s += description(schema); 66 | 67 | s += 'A machine-readable JSON schema can be found [here](./debugAdapterProtocol.json).\n\n'; 68 | 69 | s += 'The change history of the specification lives [here](./changelog).\n'; 70 | 71 | for (let typeName in schema.definitions) { 72 | 73 | const d2 = schema.definitions[typeName]; 74 | 75 | let supertype: string = null; 76 | if ((d2).allOf) { 77 | const array = (d2).allOf; 78 | for (let d of array) { 79 | if ((d).$ref) { 80 | supertype = getRef((d).$ref); 81 | } else { 82 | s+= Type(typeName, d, supertype); 83 | } 84 | } 85 | } else { 86 | s+= Type(typeName, d2); 87 | } 88 | } 89 | 90 | s += line(); 91 | 92 | return s; 93 | } 94 | 95 | let lastRequestType = ''; 96 | 97 | function Type(typeName: string, definition: P.Definition | P.StringType, supertype?: string): string { 98 | 99 | let heading = typeName; 100 | let shortHeading = typeName; 101 | 102 | const properties = (definition).properties; 103 | if (properties) { 104 | if (properties.event && properties.event['enum']) { 105 | const eventName = `${properties.event['enum'][0]}`; 106 | shortHeading = eventName; 107 | heading = `:arrow_left: ${camelCase(eventName)} Event`; 108 | } else if (properties.command && properties.command['enum']) { 109 | const requestName = `${properties.command['enum'][0]}`; 110 | shortHeading = requestName; 111 | const arrow = requestName === 'runInTerminal' ? ':arrow_right_hook:' : ':leftwards_arrow_with_hook:'; 112 | heading = `${arrow} ${camelCase(requestName)} Request`; 113 | lastRequestType = typeName.replace('Request', ''); 114 | } 115 | } 116 | 117 | let s = line(); 118 | 119 | if (definition['title']) { 120 | s += Header(2, definition['title']); 121 | } 122 | 123 | if (lastRequestType.length > 0 && typeName.startsWith(lastRequestType) && typeName !== `${lastRequestType}Request` && typeName !== 'DisassembledInstruction') { 124 | // this definition belongs to the previous request: don't add header but add an anchor so that we can link to it 125 | s += comment(definition); 126 | s += `\n`; 127 | } else { 128 | s += Header(3, heading, shortHeading); 129 | s += comment(definition); 130 | } 131 | 132 | s += '```typescript\n'; 133 | 134 | if ((definition).enum) { 135 | s += Enum(typeName, definition); 136 | } else if ((definition)._enum) { 137 | s += _Enum(typeName, definition); 138 | } else { 139 | s += Interface(typeName, definition, supertype); 140 | } 141 | 142 | s += '```\n'; 143 | 144 | return s; 145 | } 146 | 147 | let outline, outline2: OutlineNode; 148 | 149 | function Header(level: number, text: string, short?: string): string { 150 | 151 | const label = short ? camelCase(short) : text; 152 | 153 | let node: OutlineNode; 154 | if (!outline) { 155 | node= outline = new OutlineNode(null, label); 156 | } else if (level === 2) { 157 | node= outline2= new OutlineNode(outline, label); 158 | } else if (level === 3) { 159 | node= new OutlineNode(outline2, label); 160 | } 161 | 162 | if (level > 1) { 163 | let anchor = node.anchor ? `` : ''; 164 | return `${'#'.repeat(level)} ${anchor}${text}\n\n`; 165 | } 166 | return ''; 167 | } 168 | 169 | function description(c: P.Commentable): string { 170 | 171 | if (c.description) { 172 | return c.description.replace(/\n/g, '\n\n').replace(/\n\n- /g, '\n- ') + '\n\n'; 173 | } 174 | return ''; 175 | } 176 | 177 | function camelCase(s: string) { 178 | return s[0].toUpperCase() + s.substr(1); 179 | } 180 | 181 | //---- TypeScript ------------------------------------------------------------------------------------ 182 | 183 | let numIndents = 0; 184 | 185 | function Interface(interfaceName: string, definition: P.Definition, superType?: string): string { 186 | 187 | let x = `interface ${interfaceName}`; 188 | if (superType) { 189 | x += ` extends ${superType}`; 190 | } 191 | let s = openBlock(x); 192 | 193 | let i = 0; 194 | for (let propName in definition.properties) { 195 | if (i++ > 0) { 196 | s += '\n'; 197 | } 198 | const required = definition.required ? definition.required.indexOf(propName) >= 0 : false; 199 | s += property(propName, !required, definition.properties[propName]); 200 | } 201 | 202 | s += closeBlock(); 203 | 204 | return s; 205 | } 206 | 207 | function Enum(typeName: string, definition: P.StringType): string { 208 | const x = enumAsOrType(definition.enum); 209 | return breakLines(`${indent()}type ${typeName} = ${x};`, ' | ', ` | `) + `\n`; 210 | } 211 | 212 | function _Enum(typeName: string, definition: P.StringType): string { 213 | const x = enumAsOrType(definition._enum, true); 214 | return breakLines(`${indent()}export type ${typeName} = ${x};`, ' | ', ` | `) + `\n`; 215 | } 216 | 217 | function enumAsOrType(enm: string[], open = false) { 218 | let r = enm.map(v => `'${v}'`).join(' | '); 219 | if (open) { 220 | r += ' | string'; 221 | } 222 | return r; 223 | } 224 | 225 | function enumDescriptions(c: P.Commentable, markdown: boolean) { 226 | 227 | const bullet = markdown ? '- ' : ''; 228 | let description = ''; 229 | const e = c.enum || c._enum; 230 | if (e) { 231 | description += '\nValues: '; 232 | if (c.enumDescriptions) { 233 | for (let i = 0; i < e.length; i++) { 234 | description += `\n${bullet}'${e[i]}': ${c.enumDescriptions[i]}`; 235 | } 236 | if (c._enum) { 237 | description += '\netc.'; 238 | } 239 | } else { 240 | description += `${e.map(v => `'${v}'`).join(', ')}`; 241 | if (c._enum) { 242 | description += ', etc.'; 243 | } 244 | } 245 | } 246 | return description; 247 | } 248 | 249 | function comment(c: P.Commentable): string { 250 | 251 | let description = c.description || ''; 252 | 253 | // array 254 | if ((c).items) { 255 | c = (c).items; 256 | } 257 | 258 | if (description) { 259 | if (numIndents === 0) { 260 | 261 | // in markdown 262 | description = description.replace(/\n/g, '\n\n').replace(/\n\n- /g, '\n- '); 263 | description += enumDescriptions(c, true); 264 | return description + '\n\n'; 265 | } else { 266 | 267 | // in code 268 | description += enumDescriptions(c, false); 269 | description = description.replace(/(.*)<\/code>/g, "'$1'"); 270 | const ind = indent(); 271 | return `${ind}/**` + breakLines('\n' + description, ' ', ` * `) + `\n${ind} */\n`; 272 | } 273 | } 274 | return ''; 275 | } 276 | 277 | function breakLines(s: string, breakPat: string, lineStart: string): string { 278 | s = s.replace(/\n/g, `${breakPat}@@@${breakPat}`); // preserve newlines as a special word 279 | let ind = `${indent()}${lineStart}`; 280 | const result: string[] = []; 281 | const words= s.split(breakPat); 282 | let line = ''; 283 | for (let w of words) { 284 | 285 | if (w === '@@@') { 286 | // force a new line 287 | result.push(line); 288 | line = ''; 289 | continue; 290 | } 291 | 292 | if (ind.length + line.length + w.length + 1 > MAX_LINE_LENGTH) { 293 | // word doesn't fit into line: start a new line 294 | result.push(line); 295 | line = ''; 296 | } 297 | 298 | if (line.length > 0) { 299 | line += breakPat; 300 | } 301 | line += w; 302 | } 303 | if (line.length > 0) { 304 | result.push(line); 305 | } 306 | return result.map(l => l.trimEnd()).join(`\n${ind}`); 307 | } 308 | 309 | function openBlock(str: string, openChar?: string, indent?: boolean): string { 310 | indent = typeof indent === 'boolean' ? indent : true; 311 | openChar = openChar || ' {'; 312 | let s = line(`${str}${openChar}`, true, indent); 313 | numIndents++; 314 | return s; 315 | } 316 | 317 | function closeBlock(closeChar?: string, newline?: boolean): string { 318 | newline = typeof newline === 'boolean' ? newline : true; 319 | closeChar = closeChar || '}'; 320 | numIndents--; 321 | return line(closeChar, newline); 322 | } 323 | 324 | function propertyType(prop: any): string { 325 | if (prop.$ref) { 326 | return getRef(prop.$ref); 327 | } 328 | if (Array.isArray(prop.oneOf)) { 329 | return (prop.oneOf as any[]).map(t => propertyType(t)).join(' | ') 330 | } 331 | switch (prop.type) { 332 | case 'array': 333 | const s = propertyType(prop.items); 334 | if (s.indexOf(' ') >= 0) { 335 | return `(${s})[]`; 336 | } 337 | return `${s}[]`; 338 | case 'object': 339 | return objectType(prop); 340 | case 'string': 341 | if (prop.enum) { 342 | return breakLines(enumAsOrType(prop.enum), ' | ', ` | `); 343 | } else if (prop._enum) { 344 | return breakLines(enumAsOrType(prop._enum, true), ' | ', ` | `); 345 | } 346 | return `string`; 347 | case 'integer': 348 | return 'number'; 349 | } 350 | if (Array.isArray(prop.type)) { 351 | if (prop.type.length === 7 && prop.type.sort().join() === 'array,boolean,integer,null,number,object,string') { // silly way to detect all possible json schema types 352 | return 'any'; 353 | } else { 354 | return prop.type.map(v => v === 'integer' ? 'number' : v).join(' | '); 355 | } 356 | } 357 | return prop.type; 358 | } 359 | 360 | function objectType(prop: any): string { 361 | if (prop.properties) { 362 | let s = openBlock('', '{', false); 363 | 364 | let i = 0; 365 | for (let propName in prop.properties) { 366 | if (i++ > 0) { 367 | s += '\n'; 368 | } 369 | const required = prop.required ? prop.required.indexOf(propName) >= 0 : false; 370 | s += property(propName, !required, prop.properties[propName]); 371 | } 372 | 373 | s += closeBlock('}', false); 374 | return s; 375 | } 376 | 377 | if (typeof prop.additionalProperties === 'boolean') { 378 | return `{ [key: string]: any; }`; 379 | } 380 | 381 | if (prop.additionalProperties) { 382 | return `{ [key: string]: ${orType(prop.additionalProperties.type)}; }`; 383 | } 384 | return '{}'; 385 | } 386 | 387 | function orType(enm: string | string[]): string { 388 | if (typeof enm === 'string') { 389 | return enm; 390 | } 391 | return enm.join(' | '); 392 | } 393 | 394 | function property(name: string, optional: boolean, prop: P.PropertyType): string { 395 | let s = ''; 396 | s += comment(prop); 397 | const type = propertyType(prop); 398 | const propertyDef = `${name}${optional ? '?' : ''}: ${type}`; 399 | if (type[0] === '\'' && type[type.length-1] === '\'' && type.indexOf('|') < 0) { 400 | s += line(`${propertyDef};`); 401 | } else { 402 | s += line(`${propertyDef};`); 403 | } 404 | return s; 405 | } 406 | 407 | function getRef(ref: string): string { 408 | const REXP = /#\/(.+)\/(.+)/; 409 | const matches = REXP.exec(ref); 410 | if (matches && matches.length === 3) { 411 | return matches[2]; 412 | } 413 | console.log('error: ref'); 414 | return ref; 415 | } 416 | 417 | function indent(): string { 418 | return ' '.repeat(numIndents); 419 | } 420 | 421 | function line(str?: string, newline?: boolean, indnt?: boolean): string { 422 | newline = typeof newline === 'boolean' ? newline : true; 423 | indnt = typeof indnt === 'boolean' ? indnt : true; 424 | let s = ''; 425 | if (str) { 426 | if (indnt) { 427 | s += indent(); 428 | } 429 | s += str; 430 | } 431 | if (newline) { 432 | s += '\n'; 433 | } 434 | return s; 435 | } 436 | 437 | /// Main 438 | 439 | const debugProtocolSchema = JSON.parse(fs.readFileSync('./debugAdapterProtocol.json').toString()); 440 | 441 | fs.writeFileSync(`specification.md`, MarkDown(debugProtocolSchema), { encoding: 'utf-8'}); 442 | 443 | fs.writeFileSync(`_data/specification-toc.yml`, outline.dump(), { encoding: 'utf-8'}); 444 | -------------------------------------------------------------------------------- /spec-generator/json_schema.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * TypeScript definitions for a subset of the json schema. 3 | */ 4 | 5 | export interface IProtocol { 6 | 7 | $schema: string, 8 | title: string, 9 | description: string, 10 | type: "object", 11 | 12 | definitions: { [key: string]: Protocol.Definition2 } 13 | } 14 | 15 | export module Protocol { 16 | 17 | export interface Definition extends ObjectType { 18 | } 19 | 20 | export interface AllOf { 21 | allOf: (Definition | RefType ) [] 22 | } 23 | 24 | export type Definition2 = Definition | AllOf | StringType; 25 | type PropertyType = PrimitiveType | StringType | ObjectType | ArrayType; 26 | 27 | export interface PrimitiveType extends BaseType { 28 | type: "number" | "integer" | "boolean" 29 | } 30 | 31 | export interface Commentable { 32 | /** Description of the type */ 33 | description?: string 34 | /** Possible values of a string. */ 35 | enum?: string[] 36 | /** Possible descriptions for the values of a string. */ 37 | enumDescriptions?: string[] 38 | /** Possible values of a string. */ 39 | _enum?: string[] 40 | } 41 | 42 | export interface StringType extends BaseType, Commentable { 43 | type: "string" 44 | /** Possible values of a string. */ 45 | enum?: string[] 46 | /** Possible descriptions for the values of a string. */ 47 | enumDescriptions?: string[] 48 | /** Possible values of a string. */ 49 | _enum?: string[] 50 | } 51 | 52 | export interface ObjectType extends BaseType { 53 | type: "object" 54 | /** Properties of the type. Maps to a typed object */ 55 | properties?: { [key: string]: PropertyType; } 56 | /** Names of required properties */ 57 | required?: string[], 58 | /** Are additional properties allowed? */ 59 | additionalProperties?: boolean 60 | } 61 | 62 | export interface ArrayType extends BaseType { 63 | type: "array" 64 | /** Maps to a typed array e.g string[] */ 65 | items: RefType | PrimitiveType | StringType | ObjectType 66 | /** Cardinality of length of array type */ 67 | //minItems?: number 68 | //maxItems?: number 69 | } 70 | 71 | export interface RefType { 72 | /** Reference to a domain defined type */ 73 | $ref: string 74 | } 75 | 76 | export interface BaseType { 77 | /** Description of the type */ 78 | description?: string 79 | } 80 | } -------------------------------------------------------------------------------- /spec-generator/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "spec-generator", 3 | "version": "0.0.1", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "spec-generator", 9 | "version": "0.0.1", 10 | "devDependencies": { 11 | "@types/node": "^16.0.0", 12 | "typescript": "^4.5.5" 13 | } 14 | }, 15 | "node_modules/@types/node": { 16 | "version": "16.11.22", 17 | "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.22.tgz", 18 | "integrity": "sha512-DYNtJWauMQ9RNpesl4aVothr97/tIJM8HbyOXJ0AYT1Z2bEjLHyfjOBPAQQVMLf8h3kSShYfNk8Wnto8B2zHUA==", 19 | "dev": true 20 | }, 21 | "node_modules/typescript": { 22 | "version": "4.5.5", 23 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", 24 | "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", 25 | "dev": true, 26 | "bin": { 27 | "tsc": "bin/tsc", 28 | "tsserver": "bin/tsserver" 29 | }, 30 | "engines": { 31 | "node": ">=4.2.0" 32 | } 33 | } 34 | }, 35 | "dependencies": { 36 | "@types/node": { 37 | "version": "16.11.22", 38 | "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.22.tgz", 39 | "integrity": "sha512-DYNtJWauMQ9RNpesl4aVothr97/tIJM8HbyOXJ0AYT1Z2bEjLHyfjOBPAQQVMLf8h3kSShYfNk8Wnto8B2zHUA==", 40 | "dev": true 41 | }, 42 | "typescript": { 43 | "version": "4.5.5", 44 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", 45 | "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", 46 | "dev": true 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /spec-generator/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "spec-generator", 3 | "version": "0.0.1", 4 | "description": "Generator", 5 | "author": { 6 | "name": "Microsoft Corporation", 7 | "email": "aweinand@microsoft.com" 8 | }, 9 | "main": "out/generator.js", 10 | "private": true, 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/Microsoft/debug-adapter-protocol.git" 14 | }, 15 | "bugs": { 16 | "url": "https://github.com/Microsoft/debug-adapter-protocol/issues" 17 | }, 18 | "devDependencies": { 19 | "@types/node": "^16.0.0", 20 | "typescript": "^4.5.5" 21 | }, 22 | "scripts": { 23 | "compile": "tsc -p .", 24 | "watch": "tsc -w -p ." 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /spec-generator/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "moduleResolution": "node", 5 | "noImplicitAny": false, 6 | "removeComments": false, 7 | "preserveConstEnums": true, 8 | "target": "ES6", 9 | "sourceMap": true, 10 | "inlineSourceMap": false, 11 | "outDir": "./out", 12 | "typeRoots": [ "./node_modules/@types/" ], 13 | "strictNullChecks": false 14 | }, 15 | "exclude": [ 16 | "node_modules" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /webfonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/webfonts/fa-brands-400.eot -------------------------------------------------------------------------------- /webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /webfonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/webfonts/fa-regular-400.eot -------------------------------------------------------------------------------- /webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /webfonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/webfonts/fa-solid-900.eot -------------------------------------------------------------------------------- /webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/d863f0108ab0a5e374b727ef162cc926046fda78/webfonts/fa-solid-900.woff2 --------------------------------------------------------------------------------