@@ -11,7 +11,6 @@ import { PowerShellProcess} from "../process";
1111import { SessionManager , SessionStatus } from "../session" ;
1212import Settings = require( "../settings" ) ;
1313import utils = require( "../utils" ) ;
14- import { NamedPipeDebugAdapter } from "../debugAdapter" ;
1514import { Logger } from "../logging" ;
1615import { LanguageClientConsumer } from "../languageClientConsumer" ;
1716
@@ -37,20 +36,16 @@ export class DebugSessionFeature extends LanguageClientConsumer
3736
3837 createDebugAdapterDescriptor (
3938 session : vscode . DebugSession ,
40- _executable : vscode . DebugAdapterExecutable ) : vscode . ProviderResult < vscode . DebugAdapterDescriptor > {
39+ _executable : vscode . DebugAdapterExecutable | undefined ) : vscode . ProviderResult < vscode . DebugAdapterDescriptor > {
4140
4241 const sessionDetails = session . configuration . createTemporaryIntegratedConsole
4342 ? this . tempSessionDetails
4443 : this . sessionManager . getSessionDetails ( ) ;
4544
46- // Establish connection before setting up the session
4745 this . logger . writeVerbose ( `Connecting to pipe: ${ sessionDetails . debugServicePipeName } ` ) ;
4846 this . logger . writeVerbose ( `Debug configuration: ${ JSON . stringify ( session . configuration ) } ` ) ;
4947
50- const debugAdapter = new NamedPipeDebugAdapter ( sessionDetails . debugServicePipeName , this . logger ) ;
51- debugAdapter . start ( ) ;
52-
53- return new vscode . DebugAdapterInlineImplementation ( debugAdapter ) ;
48+ return new vscode . DebugAdapterNamedPipeServer ( sessionDetails . debugServicePipeName ) ;
5449 }
5550
5651 // tslint:disable-next-line:no-empty
@@ -60,19 +55,16 @@ export class DebugSessionFeature extends LanguageClientConsumer
6055 public setLanguageClient ( languageClient : LanguageClient ) {
6156 languageClient . onNotification (
6257 StartDebuggerNotificationType ,
63- ( ) =>
64- // TODO: Use a named debug configuration.
65- vscode . debug . startDebugging ( undefined , {
66- request : "launch" ,
67- type : "PowerShell" ,
68- name : "PowerShell: Interactive Session" ,
69- } ) ) ;
58+ // TODO: Use a named debug configuration.
59+ ( ) => vscode . debug . startDebugging ( undefined , {
60+ request : "launch" ,
61+ type : "PowerShell" ,
62+ name : "PowerShell: Interactive Session"
63+ } ) ) ;
7064
7165 languageClient . onNotification (
7266 StopDebuggerNotificationType ,
73- ( ) =>
74- vscode . debug . stopDebugging ( undefined )
75- ) ;
67+ ( ) => vscode . debug . stopDebugging ( undefined ) ) ;
7668 }
7769
7870 public async provideDebugConfigurations (
@@ -374,7 +366,7 @@ export class SpecifyScriptArgsFeature implements vscode.Disposable {
374366
375367 const text = await vscode . window . showInputBox ( options ) ;
376368 // When user cancel's the input box (by pressing Esc), the text value is undefined.
377- // Let's not blow away the previous settting .
369+ // Let's not blow away the previous setting .
378370 if ( text !== undefined ) {
379371 this . context . workspaceState . update ( powerShellDbgScriptArgsKey , text ) ;
380372 }
0 commit comments