[all-commits] [llvm/llvm-project] b5d433: [lldb-dap] Create a typescript extension for lldb-...

Walter Erquinigo via All-commits all-commits at lists.llvm.org
Tue Jan 9 14:10:29 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b5d4332286154838557a8ab5c76b794e85d946b3
      https://github.com/llvm/llvm-project/commit/b5d4332286154838557a8ab5c76b794e85d946b3
  Author: Walter Erquinigo <a20012251 at gmail.com>
  Date:   2024-01-09 (Tue, 09 Jan 2024)

  Changed paths:
    A lldb/tools/lldb-dap/.editorconfig
    A lldb/tools/lldb-dap/.gitignore
    A lldb/tools/lldb-dap/.prettierrc.json
    A lldb/tools/lldb-dap/.vscode/launch.json
    A lldb/tools/lldb-dap/.vscode/tasks.json
    A lldb/tools/lldb-dap/LICENSE.TXT
    M lldb/tools/lldb-dap/README.md
    A lldb/tools/lldb-dap/package-lock.json
    M lldb/tools/lldb-dap/package.json
    A lldb/tools/lldb-dap/src-ts/debug-adapter-factory.ts
    A lldb/tools/lldb-dap/src-ts/disposable-context.ts
    A lldb/tools/lldb-dap/src-ts/extension.ts
    A lldb/tools/lldb-dap/src-ts/types.ts
    A lldb/tools/lldb-dap/tsconfig.json

  Log Message:
  -----------
  [lldb-dap] Create a typescript extension for lldb-dap (#75515)

The main motivations behind this are two:

- Allow different companies developing their own vscode extensions for
LLDB to have a single contribution point, thus sharing resources and
working as a virtual large team.
- Allow for visual ways to configure the debugger, which currently has
to be done through launch.json files.

In terms of implementation, this is very straightforward and these are
the most important details:

- All the cpp code has been moved to a subfolder for cleanness. There's
a specific commit in the list of commits of this PR that just does that,
in case that helps reviewing this.
- A new folder `src-ts` has been created for the typescript code
- The ts extension can be used in two ways: as a regular vscode
extension and as a library. There file `extension.ts` explains which
entry point to use.
- The README has been updated the mention how to install the extension,
which is simpler than before. There are two additional sections for
rebuilding and formatting.
- The ts code I added merely sets up the debug adapter using two
possible options: reading the lldb-dap path from vscode settings or from
a config object passed by users of the extension is used as a library. I
did this to show how we can support easily both worlds.




More information about the All-commits mailing list