| 870 | const frame = pause.callFrames[idx]; |
| 871 | const fileUrl = frame.url || scriptIdToUrl[frame.location.scriptId] || '<unknown>'; |
| 872 | function summarizeValue(v: any) { |
| 873 | if (!v) return { type: 'undefined' }; |
| 874 | if (v.value !== undefined) return { type: typeof v.value, value: v.value }; |
| 875 | return { type: v.type, description: v.description, className: (v as any).className, objectId: (v as any).objectId }; |
| 876 | } |
| 877 | async function listProps(objectId: string) { |
| 878 | const { result } = await nodeDebugClient!.Runtime.getProperties({ objectId, ownProperties: true, generatePreview: false }); |
| 879 | const entries = (result || []).slice(0, maxProps).map((p) => ({ name: p.name, ...summarizeValue(p.value) })); |