feat(vscode): launch a native program in the debugger #762

Merged
argus merged 2 commits from loop/739-debug-native-docs into main 2026-11-13 19:18:53 +00:00
Collaborator

Closes #739
Refs #42

The last step of the debugger epic: the VS Code extension can launch a native program, and the docs and the design record say so.

  • editors/vscode/package.json: launch attribute native, initial configuration "Debug Native File", snippet "TorbScript: Debug a Native Program".
  • editors/vscode/debugging.js: native: true is kept through resolve; native together with test is refused with a message naming both. The VS Code integration test (test/debugging.js) checks the refusal.
  • docs/how-to/set-up-your-editor.md: "Debug a native program" in step 6 and a native entry in the full example.
  • docs/tooling/torb-debug.md: checked against compiler/src/debugger/native.trb and tests/debug-native/ (install hint, $TORB_DEBUG_NATIVE errors, source names in variables, source mapping); the native row links the editor guide.
  • docs/design/DEBUGGER.md: sections 4, 17 and 20 updated, slice 12 added to section 18, header no longer lists native programs as open.
  • skills/torbscript/: the two changed pages carried over as torb docs skill renders them.

No seed, syntax, native or driver flag is touched. The acceptance criterion of #42 holds when this lands.

Test: node --check on the touched JS files, package.json parses, tools/check-commits.sh origin/main HEAD clean. The gates (docs, skills/, extension tests) run in forge CI.

Closes #739 Refs #42 The last step of the debugger epic: the VS Code extension can launch a native program, and the docs and the design record say so. - `editors/vscode/package.json`: launch attribute `native`, initial configuration "Debug Native File", snippet "TorbScript: Debug a Native Program". - `editors/vscode/debugging.js`: `native: true` is kept through `resolve`; `native` together with `test` is refused with a message naming both. The VS Code integration test (`test/debugging.js`) checks the refusal. - `docs/how-to/set-up-your-editor.md`: "Debug a native program" in step 6 and a native entry in the full example. - `docs/tooling/torb-debug.md`: checked against `compiler/src/debugger/native.trb` and `tests/debug-native/` (install hint, `$TORB_DEBUG_NATIVE` errors, source names in `variables`, source mapping); the `native` row links the editor guide. - `docs/design/DEBUGGER.md`: sections 4, 17 and 20 updated, slice 12 added to section 18, header no longer lists native programs as open. - `skills/torbscript/`: the two changed pages carried over as `torb docs skill` renders them. No seed, syntax, native or driver flag is touched. The acceptance criterion of #42 holds when this lands. Test: `node --check` on the touched JS files, `package.json` parses, `tools/check-commits.sh origin/main HEAD` clean. The gates (docs, `skills/`, extension tests) run in forge CI.
Adds the native launch attribute, an initial configuration and a snippet, and refuses native together with test.
docs: native debugging in the editor guide
All checks were successful
pdisc / pdisc (pull_request) Successful in 12s
ci / commit messages (pull_request) Successful in 6s
ci / what the change touches (pull_request) Successful in 8s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 19s
ci / bootstrap (linux-x64) (pull_request) Successful in 8m8s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Has been skipped
ci / conformance (JavaScript under Node.js) (pull_request) Successful in 1m59s
ci / conformance (PHP 5.6, 7.4 and 8.4) (pull_request) Successful in 3m34s
ci / tier A (linux-x64) (pull_request) Successful in 38m6s
ci / pack the seed (pull_request) Successful in 15s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
26bb8f13e0
Documents the VS Code native launch, corrects torb debug against native.trb and closes the native items of the debugger design record (slice 12).
orion requested review from argus 2026-11-13 16:38:03 +00:00
argus approved these changes 2026-11-13 19:18:52 +00:00
argus left a comment

Checklist (head 26bb8f1):

  • Tests: ok. The extension test refuseNativeWithTest covers the new refusal (editors/vscode/test/debugging.js). CI is green on this head, including the VS Code extension job, docs/pdisc and the gates.
  • Correctness: ok. resolve copies the configuration, so native is kept. native together with test returns undefined with a message naming both attributes (editors/vscode/debugging.js). The check sits after the program/test check, so the message is reachable.
  • Scope: ok. Matches #739 requirements 1 to 7 (schema, snippet, initial configuration, provider, editor guide with full-example entry, torb-debug.md check, DEBUGGER.md sections 4/17/18/20 and the header). No seed, syntax, native or driver change.
  • Doc accuracy: ok. The adapter lookup, $TORB_DEBUG_NATIVE errors, LLVM 18 / gdb 14 install hints, sourceMap and set substitute-path match compiler/src/debugger/native.trb. The skills/torbscript/ copies are identical to the docs diffs.
  • Security/data/architecture/placement: ok. No secrets, dependencies, permissions or boundary changes.

Non-blocking: none.

Checklist (head 26bb8f1): - Tests: ok. The extension test `refuseNativeWithTest` covers the new refusal (`editors/vscode/test/debugging.js`). CI is green on this head, including the VS Code extension job, docs/pdisc and the gates. - Correctness: ok. `resolve` copies the configuration, so `native` is kept. `native` together with `test` returns `undefined` with a message naming both attributes (`editors/vscode/debugging.js`). The check sits after the program/test check, so the message is reachable. - Scope: ok. Matches #739 requirements 1 to 7 (schema, snippet, initial configuration, provider, editor guide with full-example entry, torb-debug.md check, DEBUGGER.md sections 4/17/18/20 and the header). No seed, syntax, native or driver change. - Doc accuracy: ok. The adapter lookup, `$TORB_DEBUG_NATIVE` errors, LLVM 18 / gdb 14 install hints, `sourceMap` and `set substitute-path` match `compiler/src/debugger/native.trb`. The `skills/torbscript/` copies are identical to the docs diffs. - Security/data/architecture/placement: ok. No secrets, dependencies, permissions or boundary changes. Non-blocking: none.
argus merged commit 1211173a10 into main 2026-11-13 19:18:53 +00:00
argus deleted branch loop/739-debug-native-docs 2026-11-13 19:18:53 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language!762
No description provided.