Skip to content

Commit 87baa0e

Browse files
committed
add knownEngines lldb-dap
1 parent d5984c7 commit 87baa0e

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

  • src/tools/rust-analyzer/editors/code/src

‎src/tools/rust-analyzer/editors/code/src/debug.ts‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,11 @@ async function getDebugConfiguration(
105105
constcommandCCpp: string=createCommandLink("ms-vscode.cpptools");
106106
constcommandCodeLLDB: string=createCommandLink("vadimcn.vscode-lldb");
107107
constcommandNativeDebug: string=createCommandLink("webfreak.debug");
108+
constcommandLLDBDap: string=createCommandLink("llvm-vs-code-extensions.lldb-dap");
108109

109110
awaitvscode.window.showErrorMessage(
110111
`Install [CodeLLDB](command:${commandCodeLLDB} "Open CodeLLDB")`+
112+
`, [lldb-dap](command:${commandLLDBDap} "Open lldb-dap")`+
111113
`, [C/C++](command:${commandCCpp} "Open C/C++") `+
112114
`or [Native Debug](command:${commandNativeDebug} "Open Native Debug") for debugging.`,
113115
);
@@ -220,10 +222,21 @@ type DebugConfigProvider<Type extends string, DebugConfig extends BaseDebugConfi
220222

221223
typeKnownEnginesType=(typeofknownEngines)[keyoftypeofknownEngines];
222224
constknownEngines: {
225+
"llvm-vs-code-extensions.lldb-dap": DebugConfigProvider<"lldb-dap",LldbDapDebugConfig>;
223226
"vadimcn.vscode-lldb": DebugConfigProvider<"lldb",CodeLldbDebugConfig>;
224227
"ms-vscode.cpptools": DebugConfigProvider<"cppvsdbg"|"cppdbg",CCppDebugConfig>;
225228
"webfreak.debug": DebugConfigProvider<"gdb",NativeDebugConfig>;
226229
}={
230+
"llvm-vs-code-extensions.lldb-dap":{
231+
type: "lldb-dap",
232+
executableProperty: "program",
233+
environmentProperty: (env)=>["env",env],
234+
runnableArgsProperty: (runnableArgs: ra.CargoRunnableArgs)=>[
235+
"args",
236+
runnableArgs.executableArgs,
237+
],
238+
239+
},
227240
"vadimcn.vscode-lldb": {
228241
type: "lldb",
229242
executableProperty: "program",
@@ -336,6 +349,13 @@ type CCppDebugConfig = {
336349
};
337350
}&BaseDebugConfig<"cppvsdbg"|"cppdbg">;
338351

352+
typeLldbDapDebugConfig={
353+
program: string;
354+
args: string[];
355+
env: Record<string,string>;
356+
}&BaseDebugConfig<"lldb-dap">;
357+
358+
339359
typeCodeLldbDebugConfig={
340360
program: string;
341361
args: string[];

0 commit comments

Comments
 (0)