Skip to content

Etapa 2 PR3: VSCode extension for the DAP debugger#47

Merged
jig merged 1 commit into
developfrom
etapa2/vscode-debug
Apr 30, 2026
Merged

Etapa 2 PR3: VSCode extension for the DAP debugger#47
jig merged 1 commit into
developfrom
etapa2/vscode-debug

Conversation

@jig
Copy link
Copy Markdown
Owner

@jig jig commented Apr 30, 2026

Summary

Phase C of the Etapa 2 plan: a VSCode extension at tools/vscode-lisp/
that consumes the DAP server shipped in PR2.

  • Syntax highlighting for .lisp / .mal: a TextMate grammar
    covering comments, strings, numbers, keywords, special forms (def,
    defmacro, let, fn, if, do, try, catch, finally, throw, quote,
    quasiquote, unquote, splice-unquote, recur, macroexpand), constants
    (true/false/nil), quoted forms, and ordinary symbols.
  • Language configuration: line comments, balanced brackets,
    auto-closing pairs.
  • Debugger integration: registers type: "lisp" debug
    configurations and a DebugAdapterDescriptorFactory that spawns the
    lispdebug-build interpreter as the DAP server over stdio.
  • DebugConfigurationProvider filling in defaults when the user
    runs F5 without a launch.json.
  • Settings: lisp.debugAdapter.command (default lisp-debug) and
    lisp.debugAdapter.extraArgs.

Build & install (local)

# 1. Build the debug-build interpreter and put it on PATH
cd $REPO_ROOT
go build -tags lispdebug -o lisp-debug ./cmd/lisp
sudo install lisp-debug /usr/local/bin/

# 2. Build and install the extension
cd tools/vscode-lisp
npm install
npm run compile
npx @vscode/vsce package
code --install-extension vscode-lisp-*.vsix

Marketplace publishing is intentionally out of scope — .vsix only.

What's NOT in this PR

  • LSP features (hover, completion, go-to-definition, diagnostics).
    Those land in PR4 (LSP backend) and PR5 (LSP client + docs).
  • Conditional breakpoints, watch expressions, function breakpoints.
    Etapa 3 if ever.
  • Editing/Format/Code-actions support.

Test plan

  • npm install and npm run compile succeed (TypeScript clean).
  • package.json validates (no schema errors).
  • .gitignore excludes node_modules/, out/, *.vsix.
  • Extension files are non-empty and well-formed (out/extension.js
    generated, extension.js.map produced).
  • Go build/test suite still green (no Go changes in this PR).
  • Manual test in VSCode: open a .lisp file, F5, set a breakpoint,
    step over/in/out, inspect call stack and locals. (Requires
    reviewer to install the .vsix and the lispdebug build of the
    interpreter.)

🤖 Generated with Claude Code

New TypeScript extension at tools/vscode-lisp/ providing:

- Syntax highlighting for .lisp / .mal (TextMate grammar covering
  comments, strings, numbers, keywords, special forms, quoted forms,
  symbols, and core constants).
- Language configuration (line comments, brackets, auto-closing pairs).
- Debugger integration: registers `type: "lisp"` debuggers with VSCode
  and a DebugAdapterDescriptorFactory that spawns the lispdebug-build
  interpreter as the DAP server (`lisp-debug --dap <program>` over
  stdio).
- DebugConfigurationProvider that fills in defaults when the user runs
  F5 without a launch.json.
- Two settings: `lisp.debugAdapter.command` (default `lisp-debug`) and
  `lisp.debugAdapter.extraArgs`.

Build and install locally:

  cd tools/vscode-lisp
  npm install
  npm run compile
  npx @vscode/vsce package
  code --install-extension vscode-lisp-*.vsix

Marketplace publishing is intentionally out of scope; install via .vsix.

LSP features (hover, completion, go-to-definition) are not part of
this extension yet; they ship in PR4 (LSP backend) + PR5 (LSP client).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jig jig merged commit dfac02a into develop Apr 30, 2026
4 checks passed
@jig jig deleted the etapa2/vscode-debug branch April 30, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant