(args)
| 1566 | } |
| 1567 | |
| 1568 | cmdUntil(args) { |
| 1569 | if (!this.requireBroken()) { |
| 1570 | this.showPrompt(); |
| 1571 | return; |
| 1572 | } |
| 1573 | if (args.length < 1) { |
| 1574 | this.commandError('Syntax: until <line> | until <function>'); |
| 1575 | return; |
| 1576 | } |
| 1577 | |
| 1578 | const spec = args[0]; |
| 1579 | let path = this.currentPath; |
| 1580 | let line; |
| 1581 | |
| 1582 | if (!isNaN(parseInt(spec))) { |
| 1583 | line = parseInt(spec); |
| 1584 | if (!path) { |
| 1585 | this.commandError('No current file.'); |
| 1586 | return; |
| 1587 | } |
| 1588 | } |
| 1589 | else { |
| 1590 | // Function until |
| 1591 | path = spec; |
| 1592 | line = 0; |
| 1593 | } |
| 1594 | |
| 1595 | // Clear any previous temporary breakpoint |
| 1596 | if (this.temporaryBreakpoint) { |
| 1597 | this.doClearBreakpoint(this.temporaryBreakpoint.path, this.temporaryBreakpoint.line); |
| 1598 | } |
| 1599 | |
| 1600 | this.temporaryBreakpoint = { path, line }; |
| 1601 | this.doSetBreakpoint(path, line); |
| 1602 | |
| 1603 | this.resume(); |
| 1604 | this.doGo(); |
| 1605 | } |
| 1606 | |
| 1607 | |
| 1608 | // Build protocol options {condition, hitCount, trace} from a breakpoint's stored expressions. |
no test coverage detected