@@ -11,7 +11,6 @@ import { PowerShellProcess} from "../process";
11
11
import { SessionManager , SessionStatus } from "../session" ;
12
12
import Settings = require( "../settings" ) ;
13
13
import utils = require( "../utils" ) ;
14
- import { NamedPipeDebugAdapter } from "../debugAdapter" ;
15
14
import { Logger } from "../logging" ;
16
15
import { LanguageClientConsumer } from "../languageClientConsumer" ;
17
16
@@ -37,20 +36,16 @@ export class DebugSessionFeature extends LanguageClientConsumer
37
36
38
37
createDebugAdapterDescriptor (
39
38
session : vscode . DebugSession ,
40
- _executable : vscode . DebugAdapterExecutable ) : vscode . ProviderResult < vscode . DebugAdapterDescriptor > {
39
+ _executable : vscode . DebugAdapterExecutable | undefined ) : vscode . ProviderResult < vscode . DebugAdapterDescriptor > {
41
40
42
41
const sessionDetails = session . configuration . createTemporaryIntegratedConsole
43
42
? this . tempSessionDetails
44
43
: this . sessionManager . getSessionDetails ( ) ;
45
44
46
- // Establish connection before setting up the session
47
45
this . logger . writeVerbose ( `Connecting to pipe: ${ sessionDetails . debugServicePipeName } ` ) ;
48
46
this . logger . writeVerbose ( `Debug configuration: ${ JSON . stringify ( session . configuration ) } ` ) ;
49
47
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 ) ;
54
49
}
55
50
56
51
// tslint:disable-next-line:no-empty
@@ -60,19 +55,16 @@ export class DebugSessionFeature extends LanguageClientConsumer
60
55
public setLanguageClient ( languageClient : LanguageClient ) {
61
56
languageClient . onNotification (
62
57
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
+ } ) ) ;
70
64
71
65
languageClient . onNotification (
72
66
StopDebuggerNotificationType ,
73
- ( ) =>
74
- vscode . debug . stopDebugging ( undefined )
75
- ) ;
67
+ ( ) => vscode . debug . stopDebugging ( undefined ) ) ;
76
68
}
77
69
78
70
public async provideDebugConfigurations (
@@ -374,7 +366,7 @@ export class SpecifyScriptArgsFeature implements vscode.Disposable {
374
366
375
367
const text = await vscode . window . showInputBox ( options ) ;
376
368
// 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 .
378
370
if ( text !== undefined ) {
379
371
this . context . workspaceState . update ( powerShellDbgScriptArgsKey , text ) ;
380
372
}
0 commit comments