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 556
556
}
557
557
],
558
558
"commands" : [
559
+ {
560
+ "command" : " lldb-dap.attachToProcess" ,
561
+ "title" : " Attach to Process..." ,
562
+ "category" : " LLDB DAP"
563
+ },
559
564
{
560
565
"command" : " lldb-dap.pickProcess" ,
561
566
"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 7
7
} from "./debug-adapter-factory" ;
8
8
import { DisposableContext } from "./disposable-context" ;
9
9
import { LLDBDapConfigurationProvider } from "./debug-configuration-provider" ;
10
+ import { attachToProcess } from "./commands/attach-to-process" ;
10
11
11
12
/**
12
13
* This class represents the extension and manages its life cycle. Other extensions
@@ -48,6 +49,12 @@ export class LLDBDapExtension extends DisposableContext {
48
49
this . pushSubscription (
49
50
vscode . commands . registerCommand ( "lldb-dap.pickProcess" , pickProcess ) ,
50
51
) ;
52
+ this . pushSubscription (
53
+ vscode . commands . registerCommand (
54
+ "lldb-dap.attachToProcess" ,
55
+ attachToProcess ,
56
+ ) ,
57
+ ) ;
51
58
}
52
59
}
53
60
You can’t perform that action at this time.
0 commit comments