// Set many breakpoints at the same location. function set_breakpoints(source, location) { Assert.notEqual(gCount, NUM_BREAKPOINTS);
source.setBreakpoint(location).then(function ([response, bpClient]) { // Check that the breakpoint has properly skipped forward one line. Assert.equal(response.actualLocation.source.actor, source.actor); Assert.equal(response.actualLocation.line, location.line + 1); // Check that the same breakpoint actor was returned. Assert.equal(response.actor, gBpActor);
if (++gCount < NUM_BREAKPOINTS) {
set_breakpoints(source, location); return;
}
// After setting all the breakpoints, check that only one has effectively // remained.
threadFront.once("paused", function (packet) { // Check the return value. Assert.equal(packet.frame.where.actor, source.actor); Assert.equal(packet.frame.where.line, location.line + 1); Assert.equal(packet.why.type, "breakpoint"); Assert.equal(packet.why.actors[0], bpClient.actor); // Check that the breakpoint worked. Assert.equal(debuggee.a, 1); Assert.equal(debuggee.b, undefined);
threadFront.once("paused", function () { // We don't expect any more pauses after the breakpoint was hit once. Assert.ok(false);
});
threadFront.resume().then(function () { // Give any remaining breakpoints a chance to trigger.
do_timeout(1000, resolve);
});
}); // Continue until the breakpoint is hit.
threadFront.resume();
});
}
});
})
);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.