Skip to content

[lldb-dap] Make env and sourceMap dictionaries #95137

Closed
@JDevlieghere

Description

@JDevlieghere

The documentation specifies that the env configuration setting is a dictionary, but as seen in the examples, it really is an array consisting of key=value.

{
  "env": [ "FOO=1", "BAR" ],
}

It would be much more intuitive to make this an actual JSON dictionary. Similarly, sourceMap, although documented correctly as a [string[2]], could benefit from this as well.

{
  "env": {
    "foo": "1",
    "bar": ""
  },
  "sourceMap": {
    "/path/to/foo": "/path/to/bar",
    "/path/to/baz": "/path/to/quux"
  }
}

Not only is that a lot more readable, it's also easier to comment out certain environment variables or path remappings in launch.json.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions