(code)
| 593 | } |
| 594 | |
| 595 | async function evalInCurrentContext(code) { |
| 596 | // Repl asked for scope variables |
| 597 | if (code === '.scope') { |
| 598 | if (!selectedFrame) { |
| 599 | throw new ERR_DEBUGGER_ERROR('Requires execution to be paused'); |
| 600 | } |
| 601 | const scopes = await selectedFrame.loadScopes(); |
| 602 | return ArrayPrototypeMap(scopes, (scope) => scope.completionGroup); |
| 603 | } |
| 604 | |
| 605 | if (selectedFrame) { |
| 606 | return PromisePrototypeThen(Debugger.evaluateOnCallFrame({ |
| 607 | callFrameId: selectedFrame.callFrameId, |
| 608 | expression: code, |
| 609 | objectGroup: 'node-inspect', |
| 610 | generatePreview: true, |
| 611 | }), RemoteObject.fromEvalResult); |
| 612 | } |
| 613 | return PromisePrototypeThen(Runtime.evaluate({ |
| 614 | expression: code, |
| 615 | objectGroup: 'node-inspect', |
| 616 | generatePreview: true, |
| 617 | }), RemoteObject.fromEvalResult); |
| 618 | } |
| 619 | |
| 620 | function controlEval(input, context, filename, callback) { |
| 621 | debuglog('eval:', input); |
no test coverage detected
searching dependent graphs…