Skip to content
This repository was archived by the owner on Sep 15, 2022. It is now read-only.

Commit de8ebe6

Browse files
sigurdmsgjesse
authored andcommitted
Use the actual frame for printing single values from the cli debugger.
This closes issue #565 R=sgjesse@google.com Review URL: https://codereview.chromium.org/2122743004 .
1 parent 26240cf commit de8ebe6

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

pkg/dartino_compiler/lib/cli_debugger.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ Future<RemoteObject> _processVariable(
712712
assert(vmContext.isSpawned);
713713
assert(accesses.isNotEmpty);
714714
LocalAccess localAccess = accesses.first;
715-
int frame = vmContext.debugState.currentFrame;
715+
int frame = vmContext.debugState.actualCurrentFrameNumber;
716716
LocalValue local = await lookupValue(localAccess.localName, vmContext);
717717
if (local == null) {
718718
return new RemoteErrorObject(

tests/debugger/internal_scope_expected.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ this: Instance of '_Random'
3333
* 0: main @rnd.nextInt(255)
3434
> p
3535
rnd: Instance of '_Random'
36+
> p rnd
37+
Instance of '_Random'
3638
> q

tests/debugger/internal_scope_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Disable view of internal frames.
1212
// DartinoDebuggerCommands=toggle internal
1313
// Now we should get the stack view of the top current non-internal frame(main).
14-
// DartinoDebuggerCommands=bt,p
14+
// DartinoDebuggerCommands=bt,p,p rnd
1515
// DartinoDebuggerCommands=q
1616

1717
import 'dart:math';

0 commit comments

Comments
 (0)