// Leave `g()` on the first line so we can check that `columnNumber` is passed to the // reparsed script (`columnNumber` is only used to offset breakpoint column on the first // line of the script).
g.evaluate(`g(); function f() { for (var i = 0; i < 10; i++) {
g();
}
}
// Test for the same breakpoint positions in the original and reparsed script. function getBreakpointPositions(script) { const offsets = script.getPossibleBreakpoints(); const str = offsets.map(({ lineNumber, columnNumber }) => `${lineNumber}:${columnNumber}`).toString(); const childPositions = script.getChildScripts().map(getBreakpointPositions); return str + childPositions.toString();
}
assertEq(getBreakpointPositions(globalScript), getBreakpointPositions(reparsedScript));
Messung V0.5
¤ Dauer der Verarbeitung: 0.2 Sekunden
(vorverarbeitet)
¤
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 und die Messung sind noch experimentell.