Skip to content

Commit

Permalink
more tracelogs for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonykim1 committed Feb 19, 2025
1 parent e4995f7 commit 738dece
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/client/terminals/envCollectionActivation/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ

private async _applyCollectionImpl(resource: Resource, shell = this.applicationEnvironment.shell): Promise<void> {
const workspaceFolder = this.getWorkspaceFolder(resource);
traceLog(`Inside _applyCollectionImpl in service.ts, workspace folder is: ${workspaceFolder}`);
traceLog(`$$$$$$Inside _applyCollectionImpl in service.ts, workspace folder is: ${workspaceFolder}`);
const settings = this.configurationService.getSettings(resource);
const envVarCollection = this.getEnvironmentVariableCollection({ workspaceFolder });
if (useEnvExtension()) {
envVarCollection.clear();
traceVerbose('Do not activate terminal env vars as env extension is being used');
traceVerbose('$$$$$$Do not activate terminal env vars as env extension is being used');
return;
}

Expand Down Expand Up @@ -318,7 +318,7 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
private terminalPromptIsUnknown(resource: Resource) {
const key = this.getWorkspaceFolder(resource)?.index;
this.isPromptSet.delete(key);
traceLog(`Inside terminalPromptIsUnknown in service.ts: this.PromptSet.delete: ${key}\n`);
traceLog(`$$$$$$Inside terminalPromptIsUnknown in service.ts: this.PromptSet.delete: ${key}\n`);
}

/**
Expand All @@ -327,7 +327,7 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
private async trackTerminalPrompt(shell: string, resource: Resource, env: EnvironmentVariables | undefined) {
this.terminalPromptIsUnknown(resource);
traceLog(
`Inside trackTerminalPrompt in service.ts: just called terminalPromptIsUnknown with resource: ${resource}\n`,
`$$$$$$Inside trackTerminalPrompt in service.ts: just called terminalPromptIsUnknown with resource: ${resource}\n`,
);
if (!env) {
this.terminalPromptIsCorrect(resource);
Expand Down Expand Up @@ -359,9 +359,9 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
// PS1 returned by shell is not predictable: #22078
// Hence calculate it ourselves where possible. Should no longer be needed once #22128 is available.
const customShellType = identifyShellFromShellPath(shell);
traceLog(`Inside getPS1 in service.ts: Custom shell type is ${customShellType}`);
traceLog(`$$$$$$Inside getPS1 in service.ts: Custom shell type is ${customShellType}`);
if (this.noPromptVariableShells.includes(customShellType)) {
traceLog(`Inside getPS1 in service.ts: No prompt variable shells\n`);
traceLog(`$$$$$$Inside getPS1 in service.ts: No prompt variable shells\n`);
return env.PS1;
}
if (this.platform.osType !== OSType.Windows) {
Expand All @@ -377,7 +377,7 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
}
if (env.PS1) {
// Prefer PS1 set by env vars, as env.PS1 may or may not contain the full PS1: #22056.
traceLog(`Inside getPS1 in service.ts: Returning PS1 from env vars`);
traceLog(`$$$$$$Inside getPS1 in service.ts: Returning PS1 from env vars`);
return env.PS1;
}
return undefined;
Expand Down

0 comments on commit 738dece

Please sign in to comment.