Skip to content

Debugger: Not sure why environment variables are not getting set #32969

Closed
@dipankardas011

Description

@dipankardas011

Summary

Environment variables set in the debug config for Go programing not working as expected

Description

Steps to trigger the problem:

  1. I had specified in the $PROJECT/.zed/debug.json
[
  {
    "label": "Program cloudmeta",
    "adapter": "Delve",
    "program": "cmd/app.go",
    "request": "launch",
    "mode": "debug",
    "args": ["-run", "cluster.meta.refresh"],
    "env": {
      "KSCTL_ENVIRONMENT": "prod",
    }
  }
]
  1. then in my go program I ran os.Environ()
  2. There I couldn't see Any env with Prefix as KSCTL_

Expected Behavior:
Actual Behavior:

Zed Version and System Specs

Zed: v0.191.4 (Zed)
OS: Linux Wayland fedora 41
Memory: 15.3 GiB
Architecture: x86_64
GPU: Intel(R) Iris(R) Plus Graphics (ICL GT2) || Intel open-source Mesa driver || Mesa 25.0.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting infoIssue that needs more information from the userdebugger

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions