#132192 add some trace statements

This commit is contained in:
Sandeep Somavarapu
2021-10-11 15:23:31 +02:00
parent 6759fe1c8c
commit b8ec99894e

View File

@@ -6,6 +6,7 @@
import { VSBuffer } from 'vs/base/common/buffer';
import { CancellationToken } from 'vs/base/common/cancellation';
import { IStringDictionary } from 'vs/base/common/collections';
import { getErrorMessage } from 'vs/base/common/errors';
import { Event } from 'vs/base/common/event';
import { parse } from 'vs/base/common/json';
import { applyEdits } from 'vs/base/common/jsonEdit';
@@ -272,6 +273,7 @@ export class GlobalStateSynchroniser extends AbstractSynchroniser implements IUs
}
private async getLocalGlobalState(): Promise<IGlobalState> {
this.logService.trace('GlobalStateSync#getLocalGlobalState');
const storage: IStringDictionary<IStorageValue> = {};
const argvContent: string = await this.getLocalArgvContent();
const argvValue: IStringDictionary<any> = parse(argvContent);
@@ -291,9 +293,12 @@ export class GlobalStateSynchroniser extends AbstractSynchroniser implements IUs
private async getLocalArgvContent(): Promise<string> {
try {
this.logService.trace('GlobalStateSync#getLocalArgvContent', this.environmentService.argvResource);
const content = await this.fileService.readFile(this.environmentService.argvResource);
return content.value.toString();
} catch (error) { }
} catch (error) {
this.logService.trace(getErrorMessage(error));
}
return '{}';
}