================ @@ -116,40 +131,31 @@ export class LLDBDapDescriptorFactory const configEnvironment = config.get<{ [key: string]: string }>("environment") || {}; const dapPath = await getDAPExecutable(session); + const dapArgs = getDAPArguments(session); const dbgOptions = { env: { - ...executable?.options?.env, ...configEnvironment, ...env, }, }; - if (dapPath) { - if (!(await isExecutable(dapPath))) { - LLDBDapDescriptorFactory.showLLDBDapNotFoundMessage(dapPath); - return undefined; - } - return new vscode.DebugAdapterExecutable(dapPath, [], dbgOptions); - } else if (executable) { - if (!(await isExecutable(executable.command))) { - LLDBDapDescriptorFactory.showLLDBDapNotFoundMessage(executable.command); - return undefined; - } - return new vscode.DebugAdapterExecutable( - executable.command, - executable.args, - dbgOptions, - ); + if (dapPath === undefined || !(await isExecutable(dapPath))) { + LLDBDapDescriptorFactory.showLLDBDapNotFoundMessage(dapPath); + return undefined; } - return undefined; + return new vscode.DebugAdapterExecutable(dapPath, dapArgs, dbgOptions); } /** * Shows a message box when the debug adapter's path is not found */ - static async showLLDBDapNotFoundMessage(path: string) { + static async showLLDBDapNotFoundMessage(path: string | undefined) { const openSettingsAction = "Open Settings"; + const message = + path === undefined + ? "Unable to find the LLDB debug adapter executable." + : `Debug adapter path: ${path} is not a valid file`; ---------------- matthewbastien wrote:
Good call. This is the only place that we show notifications as far as I can tell. So, I'm leaning towards having the period at the end and changed both to match. https://github.com/llvm/llvm-project/pull/129262 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits