5
5
import vscode = require( "vscode" ) ;
6
6
import { CancellationToken , DebugConfiguration , DebugConfigurationProvider ,
7
7
ExtensionContext , ProviderResult , WorkspaceFolder } from "vscode" ;
8
- import { LanguageClient , RequestType } from "vscode-languageclient" ;
8
+ import { LanguageClient , NotificationType , RequestType } from "vscode-languageclient" ;
9
9
import { IFeature } from "../feature" ;
10
10
import { getPlatformDetails , OperatingSystem } from "../platform" ;
11
11
import { PowerShellProcess } from "../process" ;
12
12
import { SessionManager } from "../session" ;
13
13
import Settings = require( "../settings" ) ;
14
14
import utils = require( "../utils" ) ;
15
15
16
+ export const StartDebuggerNotificationType =
17
+ new NotificationType < void , void > ( "powerShell/startDebugger" ) ;
18
+
16
19
export class DebugSessionFeature implements IFeature , DebugConfigurationProvider {
17
20
18
21
private sessionCount : number = 1 ;
@@ -29,7 +32,14 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider
29
32
}
30
33
31
34
public setLanguageClient ( languageClient : LanguageClient ) {
32
- // There is no implementation for this IFeature method
35
+ languageClient . onNotification (
36
+ StartDebuggerNotificationType ,
37
+ ( ) =>
38
+ vscode . debug . startDebugging ( undefined , {
39
+ request : "launch" ,
40
+ type : "PowerShell" ,
41
+ name : "PowerShell Interactive Session" ,
42
+ } ) ) ;
33
43
}
34
44
35
45
// DebugConfigurationProvider method
0 commit comments