[Lldb-commits] [lldb] [lldb-dap] show dialog when executable is not found (PR #104711)
Walter Erquinigo via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 22 12:12:29 PDT 2024
================
@@ -14,10 +14,49 @@ export class LLDBDapDescriptorFactory
this.lldbDapOptions = lldbDapOptions;
}
+ public static async validateDebugAdapterPath(pathUri: vscode.Uri) {
+ try {
+ const fileStats = await vscode.workspace.fs.stat(pathUri);
+ if (!(fileStats.type & vscode.FileType.File)) {
+ this.showLLDBDapNotFoundMessage(pathUri.path);
+ }
+ } catch (err) {
+ this.showLLDBDapNotFoundMessage(pathUri.path);
+ }
+ }
+
async createDebugAdapterDescriptor(
session: vscode.DebugSession,
executable: vscode.DebugAdapterExecutable | undefined,
): Promise<vscode.DebugAdapterDescriptor | undefined> {
+ const config = vscode.workspace.getConfiguration(
+ "lldb-dap",
+ session.workspaceFolder,
+ );
+ const customPath = config.get<string>("executable-path");
+ const path: string = customPath ? customPath : executable!!.command;
----------------
walter-erquinigo wrote:
```suggestion
const path: string = customPath || executable!!.command;
```
https://github.com/llvm/llvm-project/pull/104711
More information about the lldb-commits
mailing list