Skip to content
This repository was archived by the owner on Apr 3, 2024. It is now read-only.

Commit 58006f0

Browse files
author
Matt Loring
committed
Fix breakpoint format on large variables
1 parent 61846c5 commit 58006f0

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

lib/state.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ StateResolver.prototype.resolveVariable_ = function(name, value) {
361361
var maxLength = this.config_.capture.maxStringLength;
362362
if (maxLength && maxLength < data.value.length) {
363363
data.value = data.value.substring(0, maxLength) + '...';
364-
data.status = MESSAGE_TABLE[STRING_LIMIT_MESSAGE_INDEX];
364+
data.status = MESSAGE_TABLE[STRING_LIMIT_MESSAGE_INDEX].status;
365365
}
366366

367367
} else if (value.isFunction()) {
@@ -371,7 +371,7 @@ StateResolver.prototype.resolveVariable_ = function(name, value) {
371371
data.varTableIndex = this.getVariableIndex_(value);
372372
var maxProps = this.config_.capture.maxProperties;
373373
if (maxProps && maxProps < Object.keys(value.value()).length) {
374-
data.status = MESSAGE_TABLE[OBJECT_LIMIT_MESSAGE_INDEX];
374+
data.status = MESSAGE_TABLE[OBJECT_LIMIT_MESSAGE_INDEX].status;
375375
}
376376

377377
} else {

test/e2e/test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ function runTest() {
177177
var promise = setBreakpoint(debuggee, {
178178
id: 'breakpoint-1',
179179
location: {path: 'test.js', line: 5},
180+
expressions: ['process'], // Process for large variable
180181
condition: 'n === 10'
181182
});
182183
// I don't know what I am doing. There is a better way to write the

test/test-v8debugapi.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ describe('v8debugapi', function() {
562562
var foo = bp.evaluatedExpressions[0];
563563
var fooVal = bp.variableTable[foo.varTableIndex];
564564
assert.equal(fooVal.members.length, 1);
565-
assert(foo.status.status.description.format.indexOf(
565+
assert(foo.status.description.format.indexOf(
566566
'Only first') !== -1);
567567
assert(!foo.status.isError);
568568

@@ -589,7 +589,7 @@ describe('v8debugapi', function() {
589589
var foo = bp.evaluatedExpressions[0];
590590
var fooVal = bp.variableTable[foo.varTableIndex];
591591
assert.equal(fooVal.members.length, 1);
592-
assert(foo.status.status.description.format.indexOf(
592+
assert(foo.status.description.format.indexOf(
593593
'Only first') !== -1);
594594
assert(!foo.status.isError);
595595

0 commit comments

Comments
 (0)