Skip to content

Commit

Permalink
Integrate from LLVM at llvm/llvm-project@2731be7
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 18, 2024
1 parent 87a43e0 commit d90c5f3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lldb-dap",
"displayName": "LLDB DAP",
"version": "0.2.5",
"version": "0.2.6",
"publisher": "llvm-vs-code-extensions",
"homepage": "https://lldb.llvm.org",
"description": "LLDB debugging from VSCode",
Expand Down Expand Up @@ -78,6 +78,15 @@
"scope": "resource",
"type": "string",
"description": "The log path for lldb-dap (if any)"
},
"lldb-dap.environment": {
"scope": "resource",
"type": "object",
"default": {},
"description": "The environment of the lldb-dap process.",
"additionalProperties": {
"type": "string"
}
}
}
},
Expand Down
11 changes: 9 additions & 2 deletions src-ts/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,15 @@ function createDefaultLLDBDapOptions(): LLDBDapOptions {
if (log_path) {
env["LLDBDAP_LOG"] = log_path;
}

const configEnvironment = config.get<{ [key: string]: string }>("environment") || {};
if (path) {
return new vscode.DebugAdapterExecutable(path, [], { env });
const dbgOptions = {
env: {
...configEnvironment,
...env,
}
};
return new vscode.DebugAdapterExecutable(path, [], dbgOptions);
} else if (packageJSONExecutable) {
return new vscode.DebugAdapterExecutable(
packageJSONExecutable.command,
Expand All @@ -36,6 +42,7 @@ function createDefaultLLDBDapOptions(): LLDBDapOptions {
...packageJSONExecutable.options,
env: {
...packageJSONExecutable.options?.env,
...configEnvironment,
...env,
},
},
Expand Down

0 comments on commit d90c5f3

Please sign in to comment.