debugger: docs, editor guide and VS Code launch for a native program (step 5 of #42) #739
Labels
No labels
loop
queue/failed
queue/queued
ready
status/parked
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
torbscript/language#739
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Epic #42, last step (5). Steps 1 to 4b are on
main:torb build --debug, the layout table and the gdb and lldb printers,torb debugwithnative: true(relay tolldb-daporgdb --interpreter=dap), and the source names invariables. What is missing is the editor side and the closing of the design record.docs/tooling/torb-debug.mdalready has a section "A native program" anddocs/design/DEBUGGER.mdsection 16 lists thenativeattribute, but the VS Code extension cannot launch one:editors/vscode/package.json(contributes.debuggers) has nonativeattribute in its launch schema, no initial configuration and no snippet for it, anddocs/how-to/set-up-your-editor.md(step 6) describes the VM only.Source
docs/design/DEBUGGER.mdsection 4 (native programs), section 17 (VS Code), section 18 (slices), section 20 (Open, "Native programs")docs/tooling/torb-debug.md, section "A native program"compiler/src/debugger/native.trb(adapter lookup,$TORB_DEBUG_NATIVE),tests/debug-native/Requirements
editors/vscode/package.json(contributes.debuggers[0].configurationAttributes.launch.properties) shall containnative(boolean, defaultfalse, description: buildprogramwithtorb build --debugand debug the binary in lldb-dap or gdb;test,filter,console,justMyCode,noDebug,reportdo not apply).contributes.debuggers[0].configurationSnippetsshall contain "TorbScript: Debug a Native Program" (program,native: true), andinitialConfigurationsshall contain "Debug Native File" ("program": "${file}","native": true).DebugConfigurationProviderineditors/vscode/debugging.jsshall keepnative: truethroughresolve, and shall refusenativetogether withtestwith an error message that names both attributes.docs/how-to/set-up-your-editor.mdshall have, in or right after step 6, a paragraph "Debug a native program": thelaunch.jsonwithnative: true, that it needslldb-dapor gdb 14 or later on the path (and$TORB_DEBUG_NATIVE), that variables show their TorbScript names and formatted values, and which attributes do not apply. The "Full example" section shall show one suchlaunch.jsonentry.docs/tooling/torb-debug.mdshall be checked againstcompiler/src/debugger/native.trbandtests/debug-native/, and any difference (adapter order, error messages, printers shipped in the package) corrected; itsnativerow and the editor guide shall link each other.docs/design/DEBUGGER.mdshall be updated: section 17 names the native configuration, section 18 gets slice 12 (step 5, Done), the header and section 20 no longer list native programs as open, and section 4's "built later" wording says what is built.Closes #N,Refs #42).Done when
package.jsonis valid JSON and its launch schema, snippets and initial configurations contain thenativeentries of requirements 1 and 2 (node -e 'JSON.parse(require("fs").readFileSync("editors/vscode/package.json"))').editors/vscode/(if the directory has them; add one for requirement 3 where a test file fordebugging.jsexists) pass in forge CI.docs/how-to/set-up-your-editor.mdanddocs/tooling/torb-debug.mdmentionnativeconsistently; the doc checks oftools/gates.sh(links, doctests, regeneratedskills/) are green in forge CI.docs/design/DEBUGGER.mdsection 20 has no open native item, andgrep -n "native" docs/design/DEBUGGER.mdshows slice 12 in section 18.tools/check-commits.shis clean (one or two Conventional Commits, for examplefeat(vscode): launch a native programanddocs: native debugging in the editor guide).Notes
[loop:torbscript] claim implement by session:loop-torbscript-20261113 until 2026-11-13T22:40:00Z
[loop:torbscript] implement: PR #762 open, CI pending (forge runner queue, runs waiting since 16:38Z, branch loop/739-debug-native-docs, head
26bb8f13e0), next: waiting (forge runner queue). Remaining: CI result; check thattorb docs skill --checkaccepts the hand-applied skills copies.[loop:torbscript] release implement: PR #762 open, CI pending in runner queue
PR #762 (merge
1211173a1) is on main; #739 was closed by its Closes trailer. No 'After merge' steps. Merged code is in no release: the repo has no v-tag and no chore(release) commit yet. Next step, not done in this turn: cut the first stable release (version-bump PR to project.trb, compiler/project.trb, editors/vscode/package.json and compiler/src/package/version.trb, reviewer argus, then tag v0.MINOR.PATCH per release.yml). Docs and the VS Code extension are in source only until then; the edge site rebuilds from main.