bolt/deps/llvm-18.1.8/lldb/tools/lldb-dap/src-ts/debug-adapter-factory.ts
2025-02-14 19:21:04 +01:00

23 lines
703 B
TypeScript

import * as vscode from "vscode";
import { LLDBDapOptions } from "./types";
/**
* This class defines a factory used to find the lldb-dap binary to use
* depending on the session configuration.
*/
export class LLDBDapDescriptorFactory
implements vscode.DebugAdapterDescriptorFactory
{
private lldbDapOptions: LLDBDapOptions;
constructor(lldbDapOptions: LLDBDapOptions) {
this.lldbDapOptions = lldbDapOptions;
}
async createDebugAdapterDescriptor(
session: vscode.DebugSession,
executable: vscode.DebugAdapterExecutable | undefined,
): Promise<vscode.DebugAdapterDescriptor | undefined> {
return this.lldbDapOptions.createDapExecutableCommand(session, executable);
}
}