MCPcopy Create free account
hub / github.com/ScriptedAlchemy/devtools-debugger-mcp / getProps

Function getProps

tests/node-debug-advanced.test.ts:48–56  ·  view source on GitHub ↗
(Runtime: Client['Runtime'], objectId: string, limit = 20)

Source from the content-addressed store, hash-verified

46}
47
48async function getProps(Runtime: Client['Runtime'], objectId: string, limit = 20) {
49 if (!objectId) return [];
50 const { result } = await Runtime.getProperties({ objectId, ownProperties: true, generatePreview: true });
51 return (result || []).slice(0, limit).map((p: any) => {
52 const v = p.value || {};
53 const val = Object.prototype.hasOwnProperty.call(v, 'value') ? v.value : (v.description || v.type);
54 return { name: p.name, type: v.type, value: val, objectId: v.objectId };
55 });
56}
57
58async function collectScopes(Runtime: Client['Runtime'], frame: any, parsedScripts: any[]) {
59 const scopes: any[] = [];

Callers 1

collectScopesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected