@@ -285,14 +285,6 @@ export class SessionManager implements Middleware {
285
285
return vscode . Uri . joinPath ( this . sessionsFolder , "PSES-VSCode-" + process . env . VSCODE_PID + "-" + uniqueId + ".json" ) ;
286
286
}
287
287
288
- public async writeSessionFile ( sessionFilePath : vscode . Uri , sessionDetails : IEditorServicesSessionDetails ) {
289
- await vscode . workspace . fs . createDirectory ( this . sessionsFolder ) ;
290
-
291
- const writeStream = fs . createWriteStream ( sessionFilePath . fsPath ) ;
292
- writeStream . write ( JSON . stringify ( sessionDetails ) ) ;
293
- writeStream . close ( ) ;
294
- }
295
-
296
288
public static readSessionFile ( sessionFilePath : vscode . Uri ) : IEditorServicesSessionDetails {
297
289
// TODO: Use vscode.workspace.fs.readFile instead of fs.readFileSync.
298
290
const fileContents = fs . readFileSync ( sessionFilePath . fsPath , "utf-8" ) ;
@@ -307,9 +299,7 @@ export class SessionManager implements Middleware {
307
299
}
308
300
}
309
301
310
- public createDebugSessionProcess (
311
- sessionPath : vscode . Uri ,
312
- sessionSettings : Settings . ISettings ) : PowerShellProcess {
302
+ public createDebugSessionProcess ( sessionSettings : Settings . ISettings ) : PowerShellProcess {
313
303
314
304
// NOTE: We only support one temporary integrated console at a time. To
315
305
// support more, we need to track each separately, and tie the session
@@ -327,7 +317,7 @@ export class SessionManager implements Middleware {
327
317
"[TEMP] PowerShell Integrated Console" ,
328
318
this . log ,
329
319
this . editorServicesArgs + "-DebugServiceOnly " ,
330
- sessionPath ,
320
+ this . getNewSessionFilePath ( ) ,
331
321
sessionSettings ) ;
332
322
333
323
// Similar to the regular integrated console, we need to send a key
@@ -493,16 +483,14 @@ export class SessionManager implements Middleware {
493
483
private startPowerShell ( ) {
494
484
this . setSessionStatus ( "Starting..." , SessionStatus . Initializing ) ;
495
485
496
- const sessionFilePath = this . getNewSessionFilePath ( ) ;
497
-
498
486
this . languageServerProcess =
499
487
new PowerShellProcess (
500
488
this . PowerShellExeDetails . exePath ,
501
489
this . bundledModulesPath ,
502
490
"PowerShell Integrated Console" ,
503
491
this . log ,
504
492
this . editorServicesArgs ,
505
- sessionFilePath ,
493
+ this . getNewSessionFilePath ( ) ,
506
494
this . sessionSettings ) ;
507
495
508
496
this . languageServerProcess . onExited (
0 commit comments