opencode
opencode copied to clipboard
docs: add infos about server debugging
Was not able to setup debugging according to CONTRIBUTING.md:
-
bun dev spawndid 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