55import vscode = require( "vscode" ) ;
66import { CancellationToken , DebugConfiguration , DebugConfigurationProvider ,
77 ExtensionContext , ProviderResult , WorkspaceFolder } from "vscode" ;
8- import { LanguageClient , RequestType } from "vscode-languageclient" ;
8+ import { LanguageClient , NotificationType , RequestType } from "vscode-languageclient" ;
99import { IFeature } from "../feature" ;
1010import { getPlatformDetails , OperatingSystem } from "../platform" ;
1111import { PowerShellProcess } from "../process" ;
1212import { SessionManager } from "../session" ;
1313import Settings = require( "../settings" ) ;
1414import utils = require( "../utils" ) ;
1515
16+ export const StartDebuggerNotificationType =
17+ new NotificationType < void , void > ( "powerShell/startDebugger" ) ;
18+
1619export class DebugSessionFeature implements IFeature , DebugConfigurationProvider {
1720
1821 private sessionCount : number = 1 ;
@@ -29,7 +32,14 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider
2932 }
3033
3134 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+ } ) ) ;
3343 }
3444
3545 // DebugConfigurationProvider method
0 commit comments