opencode icon indicating copy to clipboard operation
opencode copied to clipboard

docs: add infos about server debugging

Open pschiel opened this issue 3 weeks ago • 0 comments

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

pschiel avatar Dec 24 '25 04:12 pschiel