Repository navigation
feat(debugger): host word for the CLI frontend and bare-name hover values - #2354
Merged
Merged
Conversation
caomengxuan666
force-pushed
the
feat/debugger-host-name-hover
branch
from
October 31, 2026 09:43
7bf47a6 to
b2bade0
Compare
- The interactive frontend derives its prompt and diagnostic word from the executable the host launched: `niu` presents `(niu-dbg)` / `niu: --debug: …`, while `rubash`, `bash`, and `sh` keep their own spellings. Unknown stems (test binaries, embedders) fall back to `rubash`, so existing transcripts stay stable. No public API or ledger change. - DAP hover/clipboard evaluation of a bare identifier renders the variable from the stop snapshot (the same rendering as `print` and watch, arrays whole) instead of returning the literal word. The zero-JS VS Code hover sends the identifier without `$`, so it previously showed the name rather than the value. - Product help advertises the native debugger faces (`--debug`, `--dap`, the spelled-out `--debug --dap` form); the bash/sh GNU faces stay byte-identical.
caomengxuan666
force-pushed
the
feat/debugger-host-name-hover
branch
from
October 31, 2026 09:53
b2bade0 to
76f611d
Compare
caomengxuan666
added a commit
to unixwin/niubash
that referenced
this pull request
Oct 31, 2026
- 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.
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
Two debugger-surface fixes found while exercising the Niubash host's
--debug/--daproutes:niupresents(niu-dbg)/niu: --debug: …, whilerubash,bash, andshkeep their own spellings. Unknown stems (test binaries, embedders) fall back torubash, so existing transcripts stay stable. No public API or ledger change.hover/clipboardevaluate for a bare identifier now renders the variable from the stop snapshot (the same rendering asprintand watch, arrays whole) instead of evaluating the literal word. VS Code hovers send the identifier without$, so the old result was the name itself.rubash --helpnow lists--debug,--dap, and the spelled-out--debug --dapform. Thebash/shGNU faces stay byte-identical (the invocation-aware help gate still passes).Tests
cargo test -p rubash --lib debugger::— 162 passed, 2 ignoredcargo test -p rubash --test issue585_invocation_aware_help_regressions— 4 passedrustfmt --checkon every touched fileThe companion Niubash PR (unixwin/niubash#754) documents the surface and consumes the derived host word.