MCPcopy
hub / github.com/microsoft/vscode-js-debug / clear

Method clear

src/adapter/sourceContainer.ts:389–399  ·  view source on GitHub ↗

* Clears all sources in the container. * @param silent If true, does not send DAP events to remove the source; used during shutdown

(silent: boolean)

Source from the content-addressed store, hash-verified

387 * @param silent If true, does not send DAP events to remove the source; used during shutdown
388 */
389 public clear(silent: boolean) {
390 this.scriptsById.clear();
391 for (const source of this._sourceByReference.values()) {
392 this.removeSource(source, silent);
393 }
394
395 this._sourceByReference.clear();
396 if (this.sourceMapFactory instanceof CachingSourceMapFactory) {
397 this.sourceMapFactory.invalidateCache();
398 }
399 }
400
401 /**
402 * Returns all the possible locations the given location can map to or from,

Callers

nothing calls this directly

Calls 4

removeSourceMethod · 0.95
valuesMethod · 0.80
invalidateCacheMethod · 0.80
clearMethod · 0.65

Tested by

no test coverage detected