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

Function registerProfilingCommand

src/ui/profiling.ts:10–25  ·  view source on GitHub ↗
(
  context: vscode.ExtensionContext,
  container: Container,
)

Source from the content-addressed store, hash-verified

8import { UiProfileManager } from './profiling/uiProfileManager';
9
10export const registerProfilingCommand = (
11 context: vscode.ExtensionContext,
12 container: Container,
13) => {
14 const manager = container.get(UiProfileManager);
15
16 context.subscriptions.push(
17 registerCommand(vscode.commands, Commands.StartProfile, sessionIdOrArgs =>
18 manager.start(
19 typeof sessionIdOrArgs === 'string'
20 ? { sessionId: sessionIdOrArgs }
21 : sessionIdOrArgs ?? {},
22 )),
23 registerCommand(vscode.commands, Commands.StopProfile, sessionId => manager.stop(sessionId)),
24 );
25};

Callers 1

activateFunction · 0.90

Calls 5

registerCommandFunction · 0.90
getMethod · 0.65
pushMethod · 0.65
startMethod · 0.65
stopMethod · 0.65

Tested by

no test coverage detected