================
@@ -8,15 +11,7 @@ import { LLDBDapOptions } from "./types";
 export class LLDBDapDescriptorFactory
   implements vscode.DebugAdapterDescriptorFactory
 {
-  private lldbDapOptions: LLDBDapOptions;
-
-  constructor(lldbDapOptions: LLDBDapOptions) {
-    this.lldbDapOptions = lldbDapOptions;
-  }
-
-  static async isValidDebugAdapterPath(
-    pathUri: vscode.Uri,
-  ): Promise<Boolean> {
+  static async isValidFile(pathUri: vscode.Uri): Promise<Boolean> {
     try {
----------------
ashgti wrote:

We may want to validate that the file is executable. It looks like the VS Code 
FS API doesn't have that info but we could use the node FS instead, something 
like:
```
import { access, constants } from 'node:fs/promises';

try {
  await access('<path>', constants.X_OK);
  console.log('can execute');
} catch {
  console.error('cannot execute');
} 
```

https://github.com/llvm/llvm-project/pull/118547
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to