================ @@ -0,0 +1,57 @@ +import * as vscode from "vscode"; +import { LLDBDapOptions } from "./types"; +import { DisposableContext } from "./disposable-context"; +import { LLDBDapDescriptorFactory } from "./debug-adapter-factory"; +import * as fs from 'fs/promises' + +/** + * This creates the configurations for this project if used as a standalone + * extension. + */ +function createDefaultLLDBDapOptions(): LLDBDapOptions { + return { + debuggerType: "lldb-dap", + async createDapExecutableCommand( + session: vscode.DebugSession, + packageJSONExecutable: vscode.DebugAdapterExecutable | undefined, + ): Promise<vscode.DebugAdapterExecutable | undefined> { + const path = vscode.workspace + .getConfiguration("lldb-dap", session.workspaceFolder) + .get<string>("executable-path"); + if (path) { + return new vscode.DebugAdapterExecutable(path, []); + } + return packageJSONExecutable; + }, + }; +} + +/** + * This class represents the extension and manages its life cycle. Other extensions + * using it as as library should use this class as the main entry point. + */ +export class LLDBDapExtension extends DisposableContext { + private lldbDapOptions: LLDBDapOptions; + + constructor(lldbDapOptions: LLDBDapOptions) { + super(); + this.lldbDapOptions = lldbDapOptions; + + vscode.window.showInformationMessage(this.lldbDapOptions.debuggerType); ---------------- ashgti wrote:
Do we need a notification each time this is created? https://github.com/llvm/llvm-project/pull/75515 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits