Skip to content

feat(debugger): document and wire the native debugger frontends - #754

Merged
caomengxuan666 merged 2 commits into
masterfrom
feat/native-debugger-surface
Oct 31, 2026
Merged

caomengxuan666 merged 2 commits into
masterfrom
feat/native-debugger-surface

Conversation

@caomengxuan666

@caomengxuan666 caomengxuan666 commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

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 --help gains a Script debugging block: interactive --debug <script>, DAP --dap <script>, the pure-server --dap form, the spelled-out --debug --dap editor form, and GNU bashdb --debugger. The GNU long-option column is unchanged, so the parser-table count gate still holds.
  • The CLI frontend presents (niu-dbg) and niu: --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.md rewrites the stale extdebug-only section; the agent skill gets the same short reference.
  • Adds the zero-JS VS Code extension manifest for Niubash (editors/vscode/: type niubash, program niu, args --debug --dap) and its README.
  • Adds tests/dap_host_smoke.rs: drives niu --dap over 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.
  • Notes the feature in CHANGELOG Unreleased.
  • Bumps scripts/release/rubash-pin.json to 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 --locked
  • cargo test --locked --test dap_host_smoke — 2 passed
  • cargo test --locked --test issue385_help_gnu_invocation_face — 6 passed
  • cargo fmt --check -p niubash
  • sh scripts/check-rename-clean.sh — all checks passed
  • python scripts/release/verify-rubash-pin.py --self-test — ok

Manual end-to-end checks also cover the CLI prompt under ConPTY, the niu: --debug: no controlling terminal refusal, and DAP hover returning 1 for a bare x.

- 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.
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.
@caomengxuan666
caomengxuan666 merged commit efd10ac into master Oct 31, 2026
10 checks passed
@caomengxuan666
caomengxuan666 deleted the feat/native-debugger-surface branch November 2, 2026 01:11
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