File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 556556 }
557557 ],
558558 "commands" : [
559+ {
560+ "command" : " lldb-dap.attachToProcess" ,
561+ "title" : " Attach to Process..." ,
562+ "category" : " LLDB DAP"
563+ },
559564 {
560565 "command" : " lldb-dap.pickProcess" ,
561566 "title" : " Pick Process" ,
Original file line number Diff line number Diff line change 1+ import * as vscode from "vscode" ;
2+
3+ export async function attachToProcess ( ) : Promise < boolean > {
4+ return await vscode . debug . startDebugging ( undefined , {
5+ type : "lldb-dap" ,
6+ request : "attach" ,
7+ name : "Attach to Process" ,
8+ pid : "${command:pickProcess}" ,
9+ } ) ;
10+ }
Original file line number Diff line number Diff line change 77} from "./debug-adapter-factory" ;
88import { DisposableContext } from "./disposable-context" ;
99import { LLDBDapConfigurationProvider } from "./debug-configuration-provider" ;
10+ import { attachToProcess } from "./commands/attach-to-process" ;
1011
1112/**
1213 * This class represents the extension and manages its life cycle. Other extensions
@@ -48,6 +49,12 @@ export class LLDBDapExtension extends DisposableContext {
4849 this . pushSubscription (
4950 vscode . commands . registerCommand ( "lldb-dap.pickProcess" , pickProcess ) ,
5051 ) ;
52+ this . pushSubscription (
53+ vscode . commands . registerCommand (
54+ "lldb-dap.attachToProcess" ,
55+ attachToProcess ,
56+ ) ,
57+ ) ;
5158 }
5259}
5360
You can’t perform that action at this time.
0 commit comments