debugger: operate on prebuilt binaries with exec command
This command skips the compile step and uses the named binary directly.
We add a new command exec that accepts a prebuilt binary name and skips the compile step.
Closes #6
This was faster than I expected, I hope you didn't go into much trouble understanding the code. I'll test it later today and merge it. thank you for the effort
Can you describe how did you test this feature? because I tried the following:
gh pr checkout 7
go install .
debugger exec `which reflex`
where reflex is a go program I installed with go install https://github.com/cespare/reflex
but when I try to put a breakpoint for example I get this error in the terminal
^C2024/02/24 23:17:26 ERR could not find file /home/emad/go/pkg/mod/github.com/cespare/[email protected]/main.go
2024/02/24 23:17:30 ERR could not find file /home/emad/go/pkg/mod/github.com/cespare/[email protected]/main.go
2024/02/24 23:17:33 debugger needs a command: `run`, `exec` or `test`
Hmmm. There is a bug where during a restart we try to rebuild. Need to tell it not to do that.
However, setting breakpoints works for me.