Repository navigation
feat(debugger): document and wire the native debugger frontends - #754
Merged
Merged
Conversation
- Surface the native debugger in `niu --help`: interactive `--debug <script>`, DAP `--dap <script>` (and the pure-server form), the spelled-out `--debug --dap` editor form, and GNU bashdb `--debugger`. The GNU long-option column is untouched, so the parser-table count gate still holds. - The debugger frontend presents the host word `niu` — prompt `(niu-dbg)`, refusals `niu: --debug: …` — once the engine derives it from the executable (unixwin/rubash#2354); no host call site changes. - Rewrite the "Script Debugging Flags" docs for the native debugger, keep the legacy extdebug-arming note for `-c`/`-s`/`-i`, and add the same short reference to the agent skill. - Add the zero-JS VS Code extension manifest for Niubash (`type` `niubash`, `program` `niu`, args `--debug --dap`) plus its README. - Add a host-wiring smoke test that drives `niu --dap` over Content- Length framed DAP on stdio and checks the manifest identity, and a help gate for the debugger lines.
caomengxuan666
force-pushed
the
feat/native-debugger-surface
branch
from
October 31, 2026 09:53
dd49c21 to
e9b575f
Compare
caomengxuan666
marked this pull request as ready for review
October 31, 2026 09:53
Release jobs build the pinned engine, not master, so this branch's documented `(niu-dbg)` prompt and the bare-name hover fix need the rubash commit in the pin. 76f611d5 is PR #2354's head; the integration refresh after #2354 merges takes its merge commit, per the row-11 precedent recorded in the note.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The native debugger (
niu --debug/niu --dap) landed in the engine but was invisible on the Niubash surface. This PR makes it discoverable and host-branded:niu --helpgains a Script debugging block: interactive--debug <script>, DAP--dap <script>, the pure-server--dapform, the spelled-out--debug --dapeditor form, and GNU bashdb--debugger. The GNU long-option column is unchanged, so the parser-table count gate still holds.(niu-dbg)andniu: --debug: …once the engine derives the host word from the executable (niu.exe); no host call site changes (engine side: feat(debugger): host word for the CLI frontend and bare-name hover values rubash#2354).docs/src/advanced-usage.mdrewrites the stale extdebug-only section; the agent skill gets the same short reference.editors/vscode/: typeniubash, programniu, args--debug --dap) and its README.tests/dap_host_smoke.rs: drivesniu --dapover framed DAP on stdio (initialize → launch → configurationDone → exited/terminated, exit status 0) and pins the manifest identity. Adds a help gate for the debugger lines.scripts/release/rubash-pin.jsonto rubash PR #2354's head (76f611d5) so release builds carry the engine half; the integration refresh after #2354 merges takes its merge commit, per the note.Related
unixwin/rubash#2354 carries the engine half (host word derivation + bare-name hover). This PR builds against current rubash master unchanged; after #2354 lands, the documented
(niu-dbg)prompt is live. Merge order: #2354 first, then this PR's pin refresh to the merge commit.Tests
cargo build --lockedcargo test --locked --test dap_host_smoke— 2 passedcargo test --locked --test issue385_help_gnu_invocation_face— 6 passedcargo fmt --check -p niubashsh scripts/check-rename-clean.sh— all checks passedpython scripts/release/verify-rubash-pin.py --self-test— okManual end-to-end checks also cover the CLI prompt under ConPTY, the
niu: --debug: no controlling terminalrefusal, and DAP hover returning1for a barex.