MCPcopy Index your code
hub / github.com/hediet/vscode-debug-visualizer / set

Method set

extension/src/utils/VsCodeSettings.ts:47–66  ·  view source on GitHub ↗
(value: T)

Source from the content-addressed store, hash-verified

45 }
46
47 public async set(value: T): Promise<void> {
48 const value2 = this.serializer.serializer(value);
49 const c = workspace.getConfiguration(undefined, this.scope);
50 const result = c.inspect(this.id);
51 let target: ConfigurationTarget;
52
53 if (
54 result &&
55 [result.workspaceFolderValue].some(i => i !== undefined)
56 ) {
57 target = ConfigurationTarget.WorkspaceFolder;
58 }
59 if (result && [result.workspaceValue].some(i => i !== undefined)) {
60 target = ConfigurationTarget.Workspace;
61 } else {
62 target = ConfigurationTarget.Global;
63 }
64
65 await c.update(this.id, value2, target);
66 }
67}
68
69class VsCodeSettingResource {

Callers 11

cacheFunction · 0.80
getIdFunction · 0.80
registerExtractorMethod · 0.80
getExtractionsMethod · 0.80
hotComponentFunction · 0.80
setExpressionMethod · 0.80
getDebugSessionProxyMethod · 0.80
initMethod · 0.80
initializeViewMethod · 0.80

Calls 1

updateMethod · 0.80

Tested by

no test coverage detected