MCPcopy Create free account
hub / github.com/microsoft/vscode-js-debug / decodePidAndPort

Function decodePidAndPort

src/ui/processPicker.ts:130–133  ·  view source on GitHub ↗
(encoded: string)

Source from the content-addressed store, hash-verified

128
129const encodePidAndPort = (processId: number, port?: number) => `${processId}:${port ?? ''}`;
130const decodePidAndPort = (encoded: string) => {
131 const [pid, port] = encoded.split(':');
132 return { pid: Number(pid), port: port ? Number(port) : undefined };
133};
134
135async function listProcesses(): Promise<IProcessItem | undefined> {
136 const nodeProcessPattern = /^(?:node|iojs)(?:$|\b)/i;

Callers 1

resolveProcessIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected