golang / vscode-go

Go extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=golang.Go
Other
3.78k stars 727 forks source link

Options for RR #3390

Open firelizzard18 opened 1 month ago

firelizzard18 commented 1 month ago

This is a heads up and/or discussion more than a specific request. go-delve/delve#3726 will be adding two environment variables to delve to enable passing flags to rr replay and rr record. I believe I can already set environment variables for delve, so no change is needed, but for the sake of visibility it seems worth documenting. Though now that I look for it, I can't find any documentation on using RR with vscode-go beyond it being a possible backend value, so maybe this issue should be "Document debugging with RR". I also thought it could be nice to have launch options (e.g. "traceReplayFlags") that were passed to the new environment variables, but I'm fine without that.

hyangah commented 1 month ago

Thanks for the information. I no longer have environment to run rr. So, any help to add info about rr in debug doc is greatly appreciated.

And, for new launch options, they should first go into the delve DAP documentation https://pkg.go.dev/github.com/go-delve/delve/service/dap#LaunchConfig but given that the features were implemented using env vars, I'd like to see how far we can go with the current env field. We can improve the DAP documentation and our documentation - by mentioning backend specific env vars or adding a pointer to the delve's doc if any.