( object: ObjectPreview.AnyObject, context: IPreviewContext, valueFormat?: Dap.ValueFormat, )
| 68 | } |
| 69 | |
| 70 | function 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 | |
| 91 | export function propertyWeight( |
| 92 | prop: Cdp.Runtime.PropertyDescriptor | Cdp.Runtime.PrivatePropertyDescriptor, |
no test coverage detected