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

Function previewRemoteObjectInternal

src/adapter/objectPreview/index.ts:70–89  ·  view source on GitHub ↗
(
  object: ObjectPreview.AnyObject,
  context: IPreviewContext,
  valueFormat?: Dap.ValueFormat,
)

Source from the content-addressed store, hash-verified

68}
69
70function previewRemoteObjectInternal(
71 object: ObjectPreview.AnyObject,
72 context: IPreviewContext,
73 valueFormat?: Dap.ValueFormat,
74): string {
75 // Evaluating function does not produce preview object for it.
76 if (object.type === 'function') {
77 return object.description
78 ? formatFunctionDescription(object.description, context.budget)
79 : '<function>';
80 }
81
82 if (object.type === 'object' && object.subtype === 'node') {
83 return object.description;
84 }
85
86 return 'preview' in object && object.preview
87 ? renderPreview(object.preview, context.budget, valueFormat)
88 : renderValue(object, context, valueFormat);
89}
90
91export function propertyWeight(
92 prop: Cdp.Runtime.PropertyDescriptor | Cdp.Runtime.PrivatePropertyDescriptor,

Callers 2

previewRemoteObjectFunction · 0.85
index.tsFile · 0.85

Calls 3

renderPreviewFunction · 0.85
renderValueFunction · 0.85

Tested by

no test coverage detected