(args)
| 2027 | } |
| 2028 | |
| 2029 | cmdFrame(args) { |
| 2030 | if (!this.requireBroken()) { |
| 2031 | this.showPrompt(); |
| 2032 | return; |
| 2033 | } |
| 2034 | if (args.length === 0 || !this.view.frames) { |
| 2035 | this.commandError('Syntax: frame <number>'); |
| 2036 | return; |
| 2037 | } |
| 2038 | const idx = parseInt(args[0]); |
| 2039 | if (isNaN(idx) || idx < 0 || idx >= this.view.frames.length) { |
| 2040 | this.commandError(`Frame index out of range (0-${this.view.frames.length - 1})`); |
| 2041 | return; |
| 2042 | } |
| 2043 | const frame = this.view.frames[idx]; |
| 2044 | this.doSelect(frame.value); |
| 2045 | this.currentPath = frame.path || null; |
| 2046 | this.currentLine = frame.line || null; |
| 2047 | this.listPosition = null; |
| 2048 | this.report('frame', { index: idx, frame: { name: frame.name, path: frame.path, line: frame.line, shortPath: this.shortPath(frame.path) } }, undefined, (data) => { |
| 2049 | console.log(`Selected frame #${data.index}: ${data.frame.name}`); |
| 2050 | if (data.frame.path) |
| 2051 | console.log(` ${data.frame.shortPath}:${data.frame.line}`); |
| 2052 | this.showPrompt(); |
| 2053 | }); |
| 2054 | // doSelect triggers onViewChanged for local/global, prompt will be reshown |
| 2055 | } |
| 2056 | |
| 2057 | cmdPrint(args) { |
| 2058 | if (!this.requireBroken()) { |
no test coverage detected