[Lldb-commits] [lldb] [lldb-dap] show dialog when executable is not found (PR #104711)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 19 11:27:09 PDT 2024
================
@@ -17,10 +18,32 @@ function createDefaultLLDBDapOptions(): LLDBDapOptions {
const path = vscode.workspace
.getConfiguration("lldb-dap", session.workspaceFolder)
.get<string>("executable-path");
- if (path) {
- return new vscode.DebugAdapterExecutable(path, []);
+
+ if (!path) {
+ return packageJSONExecutable;
+ }
+
+ try {
+ const fileStats = await fs.stat(path);
+ if (!fileStats.isFile() && !fileStats.isSymbolicLink()) {
+ throw new Error(`Error: ${path} is not a file`);
+ }
+ } catch (err) {
+ const error: Error = err as Error;
+ const openSettingsAction = "Open Settings";
+ const callBackValue = await vscode.window.showErrorMessage(
+ error.message,
+ { modal: true },
----------------
Da-Viper wrote:
> don't make this modal. It would be too obtrusive
I was looking at how other debugger does and they make the dialog modal
https://github.com/llvm/llvm-project/pull/104711
More information about the lldb-commits
mailing list