GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - elixir-lsp/dap_codegen: Library to generate DAP protocol code

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.vscode
.vscode
 
 
lib
lib
 
 
priv
priv
 
 
test
test
 
 
.formatter.exs
.formatter.exs
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
mix.exs
mix.exs
 
 
mix.lock
mix.lock
 
 

Repository files navigation

DAPCodegen

Library to generate DAP protocol code for gen_dap.

Usage

For DAP code generation:

elixir -e 'Mix.install([{:dap_codegen, github: "elixir-lsp/dap_codegen"}]); DAPCodegen.generate(System.argv())' -- --path ./path/for/files

Schema Files

DAP Schema

To update the debugAdapterProtocol.json, you can run the following:

curl --location 'https://microsoft.github.io/debug-adapter-protocol/debugAdapterProtocol.json' | jq . > priv/debugAdapterProtocol.json

Schema description

Request

A request in the Debug Adapter Protocol (DAP) is a message sent from the client (IDE) to the debug adapter. It typically includes the following features: Type: The type of message, which is always "request". Seq: A sequence number to identify the message. Command: The specific command being requested (e.g., "initialize", "launch"). Arguments: A set of parameters required for the command.

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "type": { "type": "string", "enum": ["request"] },
    "seq": { "type": "integer" },
    "command": { "type": "string" },
    "arguments": { "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ] }
  },
  "required": ["type", "seq", "command"]
}

Event

An event is a notification sent from the debug adapter to the client, indicating a change in state or an occurrence of interest.

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "type": { "type": "string", "enum": ["event"] },
    "seq": { "type": "integer" },
    "event": { "type": "string" },
    "body": { "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ] }
  },
  "required": ["type", "seq", "event"]
}

Response

A response is sent from the debug adapter back to the client in reply to a request.

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "type": { "type": "string", "enum": ["response"] },
    "seq": { "type": "integer" },
    "request_seq": { "type": "integer" },
    "success": { "type": "boolean" },
    "command": { "type": "string" },
    "message": { "type": "string" },
    "body": { "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ] }
  },
  "required": ["type", "seq", "request_seq", "success", "command"]
}

Error Response

An error response indicates that a request could not be processed successfully.

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "type": { "type": "string", "enum": ["response"] },
    "seq": { "type": "integer" },
    "request_seq": { "type": "integer" },
    "success": { "type": "boolean", "enum": [false] },
    "command": { "type": "string" },
    "body": {
      "type": "object",
      "properties": {
        "error": {
          "type": "object",
          "properties": {
            "id": { "type": "integer" },
            "format": { "type": "string" }
            "variables": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "sendTelemetry": {
              "type": "boolean"
            },
            "showUser": {
              "type": "boolean"
            },
            "url": {
              "type": "string"
            },
            "urlLabel": {
              "type": "string"
            }
          },
          "required": ["id", "format"]
        }
      },
      "required": ["error"]
    }
  },
  "required": ["type", "seq", "request_seq", "success", "command", "body"]
}

Credits

This library is inspired by lsp_codegen by Mitchell Hanberg.

About

Library to generate DAP protocol code

Resources

Readme
MIT license
Activity
Custom properties

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.