Skip to content

Environment variables not being set correctly in go_binary debug #7861

@Azer0s

Description

@Azer0s

Description of the bug:

I am trying to debug a Go binary with the Bazel plugin in Goland, unfortunately when I set the environment variables as the env parameter of go_binary and then click on debug, they don't show up when listing with os.Environ().
When I directly modify the build configuration in Goland, the debug button appears greyed out.

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

As described above, set up a go_binary target with env variables and try to debug it

Which Intellij IDE are you using? Please provide the specific version.

GoLand 2025.2.1; Build #GO-252.25557.175, built on September 2, 2025

What programming languages and tools are you using? Please provide specific versions.

Go 1.25.0

What Bazel plugin version are you using?

2025.08.4-api-version-252

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions