Closed KyleKotowick closed 4 years ago
After some further testing, I've found that if I set:
"[go]": {
"editor.formatOnSave": false,
}
Instead of true
, this issue does not occur.
Strangely I couldn't reproduce the problem. I copied the settings. Checked vscode/extension/go versions. The only difference I see is I am using mac, not windows. Puzzled.
@kkotowick can you also share the list of active extensions?
Enabled extensions:
Docker 1.0.0 (ms-azuretools.vscode-docker) Go 0.14.1 (ms-vscode.go) PowerShell 2020.4.0 (ms-vscode.powershell) Python 2020.3.71659 (ms-python.python) Remote - WSL 0.44.2 (ms-vscode-remote.remote-wsl) Terraform 1.4.0 (mauve.terraform) XML Tools 2.5.0 (dotjoshjohnson.xml)
I´m now sure this is related to the debug feature, as it seems to be something related to the workbench events and actions rather than anything from the debug adapter side (AFAIK we can't even control that state programatically from that process, only via responses once a debug session is active)
edit: these are just my two cents on the debug label
@lggomezml That sounds like this is an issue to be reported to upstream (microsoft/vscode).
@kkotowick I cannot even reproduce this on my mac to file an issue myself. It may be possible that this is isolated to the windows UI. Can you please file an issue in the upstream repo? Thanks.
Same issue here. $ go version go version go1.13.7 windows/amd64 $ code -v 1.45.0 d69a79b73808559a91206d73d7717ff5f798f23c x64 go extension: 0.14.2 $ go env GOOS GOARCH windows amd64
@kkotowick's work around works for me https://github.com/microsoft/vscode-go/issues/3180#issuecomment-614238283
I've just tried to reproduce this on my Windows machine, and I wasn't able to, even when the file has to be formatted and changed. It does sound like an upstream VS Code issue, so I'm going to go ahead and close this and suggest filing an issue in https://github.com/microsoft/vscode.
It might also be useful to check the gopls
version (gopls version
) to confirm that it is at the latest (gopls/v0.4.1
), because there were some formatting bugs with gopls
in earlier versions.
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Gocode -v
orcode-insiders -v
to get version of VS Code or VS Code Insidersgo env GOOS GOARCH
to get the operating system and processor architecture detailsShare the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file. Share all the settings with thego.
or["go"]
prefixes.Describe the bug
When saving a .go file, all breakpoints are removed from the file.
Steps to reproduce the behavior:
Screenshots or recordings