Skip to content
This repository was archived by the owner on Feb 1, 2022. It is now read-only.

Commit 36887c6

Browse files
author
Jan Krems
committed
fix: Properly print watchers
1 parent f6b4b20 commit 36887c6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/node-inspect.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ function formatPreview({ properties, subtype, description }, opts) {
252252
}
253253

254254
const propertyFormatter = subtype === 'array' ? formatPropertyValue : formatPropertyPair;
255-
const formattedProps = properties.map(propertyFormatter).join('\n ');
255+
const formattedProps = properties.map(propertyFormatter).concat('...').join('\n ');
256256

257257
if (subtype === 'array') {
258258
return `[ ${formattedProps} ]`;
@@ -587,8 +587,12 @@ function createCommandContext(inspector) {
587587
return Promise.resolve();
588588
}
589589

590+
const writer = createRemoteAwareWriter(true);
591+
const formatValue = value => writer(value);
592+
590593
const inspectValue = expr =>
591-
this.debugEval(expr)
594+
ctx.debugEval(expr)
595+
.then(formatValue)
592596
.catch(error => `<${error.message}>`);
593597

594598
return Promise.all(watchedExpressions.map(inspectValue))

0 commit comments

Comments
 (0)