Skip to content

Debugger: Does not understand environment variables. #32847

Open
@IronicUsername

Description

@IronicUsername

Summary

Add environment variable support in debug.json files.

Description

Steps to trigger the problem:
0. (OPTIONAL) have direnv installed and launch zed with it running prior (just to make sure it sources the envs)

  1. Configure Golang language support as described here
  2. Go into a Go Project, add the .zed/debug.json and add this:
[
{
  "label": "Remote Debug",
  "adapter": "Delve",
  "request": "attach",
  "mode": "remote",
  "tcp_connection": {
    // "host": "192.168.122.149",  <-- This works
    "host": "${REMOTE_HOST}",  <-- but i want it like this (doesnt work)
    "port": 12080
  }
}
]
  1. Start debugging (F4 by default)
  2. ???
  3. NO PROFIT!

Expected Behavior:
Zed should understand the REMOTE_HOST env variable

Actual Behavior:
It says this:

String does not match the pattern of "^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$".

Image

Zed Version and System Specs

Zed: v0.191.3 (Zed Preview)
OS: Linux X11 arch unknown
Memory: 30.9 GiB
Architecture: x86_64
GPU: NVIDIA GeForce RTX 4060 || NVIDIA || 575.57.08

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions