Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to define delve output folder in settings #3576

Open
fbaligand opened this issue Oct 22, 2024 · 1 comment
Open

Impossible to define delve output folder in settings #3576

fbaligand opened this issue Oct 22, 2024 · 1 comment
Labels
Debug Issues related to the debugging functionality of the extension. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@fbaligand
Copy link

What version of Go, VS Code & VS Code Go extension are you using?

Version Information
  • Run go version to get version of Go from the VS Code integrated terminal.
    • go1.23.2 windows/amd64
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
    • golang.org/x/tools/gopls v0.16.2
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
    • 1.94.2
  • Check your installed extensions to get the version of the VS Code Go extension
    • v0.42.1
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.

Tools Configuration

Environment

GOBIN: undefined
toolsGopath:
gopath: F:\go\packages
GOROOT: F:\go\go-1.23.2
PATH (vscode launched with): ...;F:\go\go-1.23.2\bin;F:\go\packages\bin

Tools

go:	F:\go\go-1.23.2\bin\go.exe: go version go1.23.2 windows/amd64

gopls:	F:\go\packages\bin\gopls.exe	(version: v0.16.2 built with go: go1.23.2)
gotests:	F:\go\packages\bin\gotests.exe	(version: v1.6.0 built with go: go1.23.2)
gomodifytags:	not installed
impl:	not installed
goplay:	not installed
dlv:	F:\go\packages\bin\dlv.exe	(version: v1.23.1 built with go: go1.23.2)
staticcheck:	F:\go\packages\bin\staticcheck.exe	(version: v0.5.1 built with go: go1.23.2)

Go env

Workspace Folder (formation-go): c:\Local\workspaces\workspaceGo\formation-go

set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\baligand\AppData\Local\go-build
set GOENV=C:\Users\baligand\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=F:\go\packages\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=F:\go\packages
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=F:\go\go-1.23.2
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=F:\go\go-1.23.2\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.23.2
set GODEBUG=
set GOTELEMETRY=local
set GOTELEMETRYDIR=C:\Users\baligand\AppData\Roaming\go\telemetry
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=NUL
set GOWORK=c:\Local\workspaces\workspaceGo\formation-go\go.work
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Temp\go-build946205592=/tmp/go-build -gno-record-gcc-switches

Share the Go related settings you have added/edited

{
    "go.delveConfig": {
        "output": "C:\\Temp"
    }
}

Describe the bug

A clear and concise description of what the bug.
Even if I define "go.delveConfig.output" setting (given this documentation), the binary (.exe) generated by delve is still in my "main.go" directory (instead of "C:\Temp").

A clear and concise description of what you expected to happen.
I expect that binary generated by delve (ex: __debug_bin4271654450.exe) is generated in "C:\Temp" directory, and not in my "main.go" directory.

Steps to reproduce the behavior:

  1. Put this into vscode "settings.json":
{
    "go.delveConfig": {
        "output": "C:\\Temp"
    }
}
  1. Open a "main.go" file
  2. Click on 'Run' menu, then "Run Without Debugging"
  3. See that "__debug_bin.exe" is generated into "main.go" directory, (instead of "C:\Temp")
@gopherbot gopherbot added this to the Untriaged milestone Oct 22, 2024
@findleyr findleyr added Debug Issues related to the debugging functionality of the extension. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Oct 24, 2024
@findleyr
Copy link
Contributor

CC @h9jiang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Debug Issues related to the debugging functionality of the extension. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants