MCPcopy Create free account
hub / github.com/microsoft/vscode-cpptools / showActiveHandles

Function showActiveHandles

Extension/test/common/internal.ts:23–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21import { collectGarbage } from '../../src/Utility/System/garbageCollector';
22
23function showActiveHandles() {
24 const open = (process as any)._getActiveHandles().filter(
25 (each: any) =>
26 !each.destroyed && // discard handles that claim they are destroyed.
27 !(each.fd === 0) && // ignore stdin/stdout/stderr
28 !(each.fd === 1) && // ignore stdin/stdout/stderr
29 !(each.fd === 2) && // ignore stdin/stdout/stderr
30 !(each instanceof MessagePort) && // ignore worker thread message ports
31 each.listening // keep servers that are still listening.
32
33 );
34
35 if (open.length) {
36 console.log('################');
37 console.log('Active Handles: ');
38 console.log('################');
39 console.log(open);
40 }
41}
42
43let misbehavingPromises: Set<Promise<any>>;
44

Callers 1

initDevModeChecksFunction · 0.85

Calls 1

filterMethod · 0.45

Tested by

no test coverage detected