Skip to content

Commit 47bb748

Browse files
authored
Merge pull request microsoft#158500 from microsoft/tyriar/158238
Add debug logs around auto replies
2 parents f3215d5 + eb3debd commit 47bb748

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/vs/platform/terminal/common/terminalAutoResponder.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import { timeout } from 'vs/base/common/async';
77
import { Disposable } from 'vs/base/common/lifecycle';
88
import { isWindows } from 'vs/base/common/platform';
9+
import { ILogService } from 'vs/platform/log/common/log';
910
import { ITerminalChildProcess } from 'vs/platform/terminal/common/terminal';
1011

1112
/**
@@ -26,7 +27,8 @@ export class TerminalAutoResponder extends Disposable {
2627
constructor(
2728
proc: ITerminalChildProcess,
2829
matchWord: string,
29-
response: string
30+
response: string,
31+
logService: ILogService
3032
) {
3133
super();
3234

@@ -43,6 +45,7 @@ export class TerminalAutoResponder extends Disposable {
4345
}
4446
// Auto reply and reset
4547
if (this._pointer === matchWord.length) {
48+
logService.debug(`Auto reply match: "${matchWord}", response: "${response}"`);
4649
proc.input(response);
4750
this._throttled = true;
4851
timeout(1000).then(() => this._throttled = false);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ export class PersistentTerminalProcess extends Disposable {
715715

716716
installAutoReply(match: string, reply: string) {
717717
this._autoReplies.get(match)?.dispose();
718-
this._autoReplies.set(match, new TerminalAutoResponder(this._terminalProcess, match, reply));
718+
this._autoReplies.set(match, new TerminalAutoResponder(this._terminalProcess, match, reply, this._logService));
719719
}
720720

721721
uninstallAutoReply(match: string) {

0 commit comments

Comments
 (0)