Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions lldb/tools/lldb-dap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@
"anyOf": [
{
"type": "object",
"markdownDescription": "Additional environment variables to set when launching the debug adapter executable. E.g. `{ \"FOO\": \"1\" }`",
"markdownDescription": "Additional environment variables to set when launching the debug adapter executable. For example `{ \"FOO\": \"1\" }`",
"patternProperties": {
".*": {
"type": "string"
Expand All @@ -419,10 +419,10 @@
},
{
"type": "array",
"markdownDescription": "Additional environment variables to set when launching the debug adapter executable. E.g. `[\"FOO=1\", \"BAR\"]`",
"markdownDescription": "Additional environment variables to set when launching the debug adapter executable. For example `[\"FOO=1\", \"BAR\"]`",
"items": {
"type": "string",
"pattern": "^((\\w+=.*)|^\\w+)$"
"pattern": "^\\w+(=.*)?$"
},
"default": []
}
Expand Down Expand Up @@ -672,6 +672,29 @@
},
"markdownDescription": "The list of additional arguments used to launch the debug adapter executable. Overrides any user or workspace settings."
},
"debugAdapterEnv": {
"anyOf": [
{
"type": "object",
"markdownDescription": "Additional environment variables to set when launching the debug adapter executable. For example `{ \"FOO\": \"1\" }`",
"patternProperties": {
".*": {
"type": "string"
}
},
"default": {}
},
{
"type": "array",
"markdownDescription": "Additional environment variables to set when launching the debug adapter executable. For example `[\"FOO=1\", \"BAR\"]`",
"items": {
"type": "string",
"pattern": "^\\w+(=.*)?$"
},
"default": []
}
]
},
"program": {
"type": "string",
"description": "Path to the program to attach to."
Expand Down
2 changes: 1 addition & 1 deletion lldb/tools/lldb-dap/src-ts/debug-adapter-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function validateDAPEnv(debugConfigEnv: any): boolean {
Array.isArray(debugConfigEnv) &&
debugConfigEnv.findIndex(
(entry) =>
typeof entry !== "string" || !/^((\\w+=.*)|^\\w+)$/.test(entry),
typeof entry !== "string" || !/^\w+(=.*)?$/.test(entry),
) !== -1
) {
return false;
Expand Down
Loading