(where)
| 770 | } |
| 771 | |
| 772 | function breakpointCommand(where) { |
| 773 | // Only handles line numbers of the current file |
| 774 | // TODO: make it handle function names and other files |
| 775 | const line = Number(where); |
| 776 | const possibleOffsets = findBreakpointOffsets(line, focusedFrame.script); |
| 777 | |
| 778 | if (possibleOffsets.length === 0) { |
| 779 | print(`Unable to break at line ${where}`); |
| 780 | return; |
| 781 | } |
| 782 | |
| 783 | possibleOffsets.forEach(({script, offsets}) => { |
| 784 | offsets.forEach(offset => { |
| 785 | const bp = new BreakpointHandler(breakpoints.length, script, offset); |
| 786 | script.setBreakpoint(offset, bp); |
| 787 | breakpoints.push(bp); |
| 788 | print(bp); |
| 789 | }); |
| 790 | }); |
| 791 | } |
| 792 | breakpointCommand.summary = 'Set breakpoint at the specified location.'; |
| 793 | breakpointCommand.helpText = `USAGE |
| 794 | break <line_num> |
nothing calls this directly
no test coverage detected