Skip to content

Commit 2210138

Browse files
committed
.
1 parent 86a4dad commit 2210138

File tree

6 files changed

+9
-2
lines changed

6 files changed

+9
-2
lines changed

src/vs/platform/terminal/node/ptyHostMain.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ async function startPtyHost() {
8888

8989
// Clean up
9090
process.once('exit', () => {
91+
logService.trace('Pty host exiting');
9192
logService.dispose();
9293
heartbeatService.dispose();
9394
ptyService.dispose();

src/vs/platform/terminal/node/ptyHostService.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ export class PtyHostService extends Disposable implements IPtyService {
105105
// Start the pty host when a window requests a connection, if the starter has that capability.
106106
if (this._ptyHostStarter.onRequestConnection) {
107107
Event.once(this._ptyHostStarter.onRequestConnection)(() => this._ensurePtyHost());
108+
} else {
109+
this._ensurePtyHost();
108110
}
109111

110112
this._ptyHostStarter.onWillShutdown?.(() => this._wasQuitRequested = true);

src/vs/platform/terminal/node/terminalProcess.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { IProcessEnvironment, isLinux, isMacintosh, isWindows } from 'vs/base/co
1313
import { URI } from 'vs/base/common/uri';
1414
import { Promises } from 'vs/base/node/pfs';
1515
import { localize } from 'vs/nls';
16-
import { ILogService } from 'vs/platform/log/common/log';
16+
import { ILogService, LogLevel } from 'vs/platform/log/common/log';
1717
import { IProductService } from 'vs/platform/product/common/productService';
1818
import { FlowControlConstants, IShellLaunchConfig, ITerminalChildProcess, ITerminalLaunchError, IProcessProperty, IProcessPropertyMap as IProcessPropertyMap, ProcessPropertyType, TerminalShellType, IProcessReadyEvent, ITerminalProcessOptions, PosixShellType, IProcessReadyWindowsPty } from 'vs/platform/terminal/common/terminal';
1919
import { ChildProcessMonitor } from 'vs/platform/terminal/node/childProcessMonitor';
@@ -353,6 +353,7 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess
353353
// Allow any trailing data events to be sent before the exit event is sent.
354354
// See https://github.com/Tyriar/node-pty/issues/72
355355
private _queueProcessExit() {
356+
this._logService.trace('TerminalProcess#_queueProcessExit', new Error().stack?.replace(/^Error/, ''));
356357
if (this._closeTimeout) {
357358
clearTimeout(this._closeTimeout);
358359
}
@@ -417,6 +418,7 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess
417418
}
418419

419420
shutdown(immediate: boolean): void {
421+
this._logService.trace('TerminalProcess#shutdown', new Error().stack?.replace(/^Error/, ''));
420422
// don't force immediate disposal of the terminal processes on Windows as an additional
421423
// mitigation for https://github.com/microsoft/vscode/issues/71966 which causes the pty host
422424
// to become unresponsive, disconnecting all terminals across all windows.

src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ class RemoteTerminalBackend extends BaseTerminalBackend implements ITerminalBack
165165
}
166166
const ids = Array.from(this._ptys.keys());
167167
const serialized = await this._remoteTerminalChannel.serializeTerminalState(ids);
168+
this._logService.info('remote persistTerminalState serialied', serialized);
168169
this._storageService.store(TerminalStorageKeys.TerminalBufferState, serialized, StorageScope.WORKSPACE, StorageTarget.MACHINE);
169170
}
170171

src/vs/workbench/contrib/terminal/browser/terminalService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ export class TerminalService implements ITerminalService {
422422
private _setConnected() {
423423
this._connectionState = TerminalConnectionState.Connected;
424424
this._onDidChangeConnectionState.fire();
425-
this._logService.trace('Pty host ready to use');
425+
this._logService.trace('Pty host ready');
426426
}
427427

428428
private async _reconnectToRemoteTerminals(): Promise<void> {

src/vs/workbench/contrib/terminal/electron-sandbox/localTerminalBackend.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ class LocalTerminalBackend extends BaseTerminalBackend implements ITerminalBacke
183183
async persistTerminalState(): Promise<void> {
184184
const ids = Array.from(this._ptys.keys());
185185
const serialized = await this._proxy.serializeTerminalState(ids);
186+
this._logService.info('local persistTerminalState serialied', serialized);
186187
this._storageService.store(TerminalStorageKeys.TerminalBufferState, serialized, StorageScope.WORKSPACE, StorageTarget.MACHINE);
187188
}
188189

0 commit comments

Comments
 (0)