in src/mockRuntime.ts [637:663]
private async verifyBreakpoints(path: string): Promise<void> {
const bps = this.breakPoints.get(path);
if (bps) {
await this.loadSource(path);
bps.forEach(bp => {
if (!bp.verified && bp.line < this.sourceLines.length) {
const srcLine = this.getLine(bp.line);
// if a line is empty or starts with '+' we don't allow to set a breakpoint but move the breakpoint down
if (srcLine.length === 0 || srcLine.indexOf('+') === 0) {
bp.line++;
}
// if a line starts with '-' we don't allow to set a breakpoint but move the breakpoint up
if (srcLine.indexOf('-') === 0) {
bp.line--;
}
// don't set 'verified' to true if the line contains the word 'lazy'
// in this case the breakpoint will be verified 'lazy' after hitting it once.
if (srcLine.indexOf('lazy') < 0) {
bp.verified = true;
this.sendEvent('breakpointValidated', bp);
}
}
});
}
}