[PR #6085] docs: add infos about server debugging #11729

Closed
opened 2026-02-16 18:16:40 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6085

State: closed
Merged: Yes


Was not able to setup debugging according to CONTRIBUTING.md:

  • bun dev spawn did not work at all
  • debugging server vs TUI was not clear, couldn't manage to debug server code.
  • not be able to break in a tsx file seemed unusual

Patch includes small info for working debugging commands, for server and TUI, tsx files work too with this. Using VSCode with the example launch.json.

Debug server: bun run --inspect=ws://localhost:6499/ ./src/index.ts serve --port 4096,
then attach TUI with opencode attach http://localhost:4096

Debug TUI: bun run --inspect=ws://localhost:6499/ --conditions=browser ./src/index.ts

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6085 **State:** closed **Merged:** Yes --- Was not able to setup debugging according to CONTRIBUTING.md: - `bun dev spawn` did not work at all - debugging server vs TUI was not clear, couldn't manage to debug server code. - not be able to break in a tsx file seemed unusual Patch includes small info for working debugging commands, for server and TUI, tsx files work too with this. Using VSCode with the example launch.json. Debug server: `bun run --inspect=ws://localhost:6499/ ./src/index.ts serve --port 4096`, then attach TUI with `opencode attach http://localhost:4096` Debug TUI: `bun run --inspect=ws://localhost:6499/ --conditions=browser ./src/index.ts`
yindo added the pull-request label 2026-02-16 18:16:40 -05:00
yindo closed this issue 2026-02-16 18:16:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11729