Can't seem to get the debugger running #3502

Open
opened 2026-02-16 17:40:23 -05:00 by yindo · 6 comments
Owner

Originally created by @cityvibes45 on GitHub (Dec 12, 2025).

Question

I am following the contribution guide and trying to set up the debugger, however I am running bun run --inspect=ws://localhost:6499/ dev spawn and opencode is launching in that terminal, but I can't attach to it, because it's not running on the port (lsof -i :6499 -S is blank)

Can someone help me properly get the debugger working? I'm using Webstorm on linux, thanks.

Originally created by @cityvibes45 on GitHub (Dec 12, 2025). ### Question I am following the [contribution guide](https://github.com/sst/opencode/blob/dev/CONTRIBUTING.md) and trying to set up the debugger, however I am running `bun run --inspect=ws://localhost:6499/ dev spawn` and opencode is launching in that terminal, but I can't attach to it, because it's not running on the port (`lsof -i :6499 -S` is blank) Can someone help me properly get the debugger working? I'm using Webstorm on linux, thanks.
Author
Owner

@rekram1-node commented on GitHub (Dec 12, 2025):

you should be able to specify which port it spawns on.

Tbh I haven't used the debugger before that was added by a contributor who uses it otherwise I'd try to help more here

@rekram1-node commented on GitHub (Dec 12, 2025): you should be able to specify which port it spawns on. Tbh I haven't used the debugger before that was added by a contributor who uses it otherwise I'd try to help more here
Author
Owner

@cityvibes45 commented on GitHub (Dec 12, 2025):

Yeah that's what specifying the '6499' is supposed to do, I don't know where it's defaulting to, or if its even enabling debugging at all. I want to contribute/fork this project, but I don't know how I can really develop for it if debugging is going to be a pain.

@cityvibes45 commented on GitHub (Dec 12, 2025): Yeah that's what specifying the '6499' is supposed to do, I don't know where it's defaulting to, or if its even enabling debugging at all. I want to contribute/fork this project, but I don't know how I can really develop for it if debugging is going to be a pain.
Author
Owner

@rekram1-node commented on GitHub (Dec 12, 2025):

Did you try the --port flag?

@rekram1-node commented on GitHub (Dec 12, 2025): Did you try the `--port` flag?
Author
Owner

@cityvibes45 commented on GitHub (Dec 12, 2025):

I've tried it with bun run dev -- --port=6499 and I've managed to get opencode running on the port, however I still don't have a clue how to access the debugger, its seems its just the --inspect flag is the problem, no debug.bun.sh popup or anything just straight to opencode in the terminal.

@cityvibes45 commented on GitHub (Dec 12, 2025): I've tried it with `bun run dev -- --port=6499` and I've managed to get opencode running on the port, however I still don't have a clue how to access the debugger, its seems its just the --inspect flag is the problem, no debug.bun.sh popup or anything just straight to opencode in the terminal.
Author
Owner

@rekram1-node commented on GitHub (Dec 12, 2025):

If I get a chance Ill try to properly setup a debugger, I normally just log to file

@rekram1-node commented on GitHub (Dec 12, 2025): If I get a chance Ill try to properly setup a debugger, I normally just log to file
Author
Owner

@cityvibes45 commented on GitHub (Dec 12, 2025):

OK thanks, I'll work with that way for now

@cityvibes45 commented on GitHub (Dec 12, 2025): OK thanks, I'll work with that way for now
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3502