File tree Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,15 @@ export class ServerSessionManager<T extends IDebugSessionLike> {
26
26
private readonly portLeaseTracker : IPortLeaseTracker ;
27
27
private disposables : IDisposable [ ] = [ ] ;
28
28
private servers = new Map < string , net . Server > ( ) ;
29
- private host = '127.0.0.1' ;
30
29
31
- constructor ( globalContainer : Container , sessionLauncher : ISessionLauncher < T > , host ?: string ) {
30
+ constructor (
31
+ globalContainer : Container ,
32
+ sessionLauncher : ISessionLauncher < T > ,
33
+ private readonly host = '127.0.0.1' ,
34
+ ) {
32
35
this . sessionManager = new SessionManager ( globalContainer , sessionLauncher ) ;
33
36
this . portLeaseTracker = globalContainer . get ( IPortLeaseTracker ) ;
34
37
this . disposables . push ( this . sessionManager ) ;
35
- if ( host ) {
36
- this . host = host ;
37
- }
38
38
}
39
39
40
40
/**
Original file line number Diff line number Diff line change @@ -128,15 +128,11 @@ class VsDebugServer implements ISessionLauncher<VSDebugSession> {
128
128
129
129
let debugServerPort : number | undefined = undefined ;
130
130
let debugServerHost : string | undefined = undefined ;
131
+
131
132
if ( process . argv . length >= 3 ) {
132
- // Interpret the argument as either a port number, or 'address:port'.
133
- const address = process . argv [ 2 ] ;
134
- const colonIndex = address . lastIndexOf ( ':' ) ;
135
- if ( colonIndex === - 1 ) {
136
- debugServerPort = + address ;
137
- } else {
138
- debugServerHost = address . substring ( 0 , colonIndex ) ;
139
- debugServerPort = + address . substring ( colonIndex + 1 ) ;
133
+ debugServerPort = + process . argv [ 2 ] ;
134
+ if ( process . argv . length >= 4 ) {
135
+ debugServerHost = process . argv [ 3 ] ;
140
136
}
141
137
}
142
138
You can’t perform that action at this time.
0 commit comments