debugger icon indicating copy to clipboard operation
debugger copied to clipboard

debugger: operate on prebuilt binaries with exec command

Open JackMordaunt opened this issue 2 years ago • 3 comments

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

JackMordaunt avatar Feb 23 '24 03:02 JackMordaunt

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

emad-elsaid avatar Feb 23 '24 11:02 emad-elsaid

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`

emad-elsaid avatar Feb 24 '24 22:02 emad-elsaid

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.

JackMordaunt avatar Feb 26 '24 01:02 JackMordaunt