2017-06-14 14:18:16 +00:00
|
|
|
Tests evaluateOnCallFrame in module.
|
|
|
|
|
|
|
|
Running test: testTotal
|
|
|
|
foo1 (module1:7:2)
|
|
|
|
foo2 (module2:6:9)
|
|
|
|
(anonymous) (module3:4:0)
|
2018-06-18 11:12:57 +00:00
|
|
|
local:foo1
|
2017-06-14 14:18:16 +00:00
|
|
|
[
|
|
|
|
[0] : c1 = 12
|
|
|
|
[1] : g1 = 2
|
|
|
|
]
|
|
|
|
module
|
|
|
|
[
|
|
|
|
[0] : a1 = 10
|
2017-12-07 09:45:45 +00:00
|
|
|
[1] : b1 = 11
|
|
|
|
[2] : foo1 = function foo1() { let c1 = 12; let g1 = 2; debugger; return a1 + b1 + c1 + g1; }
|
2017-06-14 14:18:16 +00:00
|
|
|
]
|
|
|
|
global
|
|
|
|
[
|
|
|
|
...
|
|
|
|
]
|
|
|
|
Check variables in frame#0
|
|
|
|
let g1 = 2;
|
|
|
|
#debugger;
|
|
|
|
return a1 + b1 + c1 + g1;
|
|
|
|
|
|
|
|
Array =
|
|
|
|
{
|
|
|
|
className : Function
|
|
|
|
description : function Array() { [native code] }
|
|
|
|
objectId : <objectId>
|
|
|
|
type : function
|
|
|
|
}
|
|
|
|
c1 =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 12
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 12
|
|
|
|
}
|
|
|
|
Evaluating: ++c1
|
|
|
|
updated c1 =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 13
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 13
|
|
|
|
}
|
|
|
|
Evaluating: --c1
|
|
|
|
g1 =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 2
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 2
|
|
|
|
}
|
|
|
|
Evaluating: ++g1
|
|
|
|
updated g1 =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 3
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 3
|
|
|
|
}
|
|
|
|
Evaluating: --g1
|
|
|
|
a1 =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 10
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 10
|
|
|
|
}
|
|
|
|
Evaluating: ++a1
|
|
|
|
updated a1 =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 11
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 11
|
|
|
|
}
|
|
|
|
Evaluating: --a1
|
|
|
|
b1 =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 11
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 11
|
|
|
|
}
|
|
|
|
Evaluating: ++b1
|
|
|
|
updated b1 =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 12
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 12
|
|
|
|
}
|
|
|
|
Evaluating: --b1
|
|
|
|
foo1 =
|
|
|
|
{
|
|
|
|
className : Function
|
|
|
|
description : function foo1() { let c1 = 12; let g1 = 2; debugger; return a1 + b1 + c1 + g1; }
|
|
|
|
objectId : <objectId>
|
|
|
|
type : function
|
|
|
|
}
|
2018-06-18 11:12:57 +00:00
|
|
|
local:foo2
|
2017-06-14 14:18:16 +00:00
|
|
|
[
|
|
|
|
[0] : c2 = 22
|
|
|
|
]
|
|
|
|
module
|
|
|
|
[
|
|
|
|
[0] : a2 = 20
|
|
|
|
[1] : foo1 = function foo1() { let c1 = 12; let g1 = 2; debugger; return a1 + b1 + c1 + g1; }
|
|
|
|
[2] : b2 = 21
|
|
|
|
[3] : foo2 = function foo2() { let c2 = 22; return foo1() + a2 + b2 + c2; }
|
|
|
|
]
|
|
|
|
global
|
|
|
|
[
|
|
|
|
...
|
|
|
|
]
|
|
|
|
Check variables in frame#1
|
|
|
|
let c2 = 22;
|
|
|
|
return #foo1() + a2 + b2 + c2;
|
|
|
|
}
|
|
|
|
|
|
|
|
Array =
|
|
|
|
{
|
|
|
|
className : Function
|
|
|
|
description : function Array() { [native code] }
|
|
|
|
objectId : <objectId>
|
|
|
|
type : function
|
|
|
|
}
|
|
|
|
c2 =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 22
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 22
|
|
|
|
}
|
|
|
|
Evaluating: ++c2
|
|
|
|
updated c2 =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 23
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 23
|
|
|
|
}
|
|
|
|
Evaluating: --c2
|
|
|
|
a2 =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 20
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 20
|
|
|
|
}
|
|
|
|
Evaluating: ++a2
|
|
|
|
updated a2 =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 21
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 21
|
|
|
|
}
|
|
|
|
Evaluating: --a2
|
|
|
|
foo1 =
|
|
|
|
{
|
|
|
|
className : Function
|
|
|
|
description : function foo1() { let c1 = 12; let g1 = 2; debugger; return a1 + b1 + c1 + g1; }
|
|
|
|
objectId : <objectId>
|
|
|
|
type : function
|
|
|
|
}
|
|
|
|
b2 =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 21
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 21
|
|
|
|
}
|
|
|
|
Evaluating: ++b2
|
|
|
|
updated b2 =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 22
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 22
|
|
|
|
}
|
|
|
|
Evaluating: --b2
|
|
|
|
foo2 =
|
|
|
|
{
|
|
|
|
className : Function
|
|
|
|
description : function foo2() { let c2 = 22; return foo1() + a2 + b2 + c2; }
|
|
|
|
objectId : <objectId>
|
|
|
|
type : function
|
|
|
|
}
|
|
|
|
module
|
|
|
|
[
|
2017-12-07 09:45:45 +00:00
|
|
|
[0] : foo2 = function foo2() { let c2 = 22; return foo1() + a2 + b2 + c2; }
|
2018-06-18 08:39:57 +00:00
|
|
|
[1] : a3 = 30
|
|
|
|
[2] : b3 = 31
|
2017-06-14 14:18:16 +00:00
|
|
|
]
|
|
|
|
global
|
|
|
|
[
|
|
|
|
...
|
|
|
|
]
|
|
|
|
Check variables in frame#2
|
|
|
|
export let b3 = 31;
|
|
|
|
#foo2();
|
|
|
|
|
|
|
|
|
|
|
|
Array =
|
|
|
|
{
|
|
|
|
className : Function
|
|
|
|
description : function Array() { [native code] }
|
|
|
|
objectId : <objectId>
|
|
|
|
type : function
|
|
|
|
}
|
|
|
|
foo2 =
|
|
|
|
{
|
|
|
|
className : Function
|
|
|
|
description : function foo2() { let c2 = 22; return foo1() + a2 + b2 + c2; }
|
|
|
|
objectId : <objectId>
|
|
|
|
type : function
|
|
|
|
}
|
2018-06-18 08:39:57 +00:00
|
|
|
a3 =
|
|
|
|
{
|
|
|
|
description : 30
|
|
|
|
type : number
|
|
|
|
value : 30
|
|
|
|
}
|
|
|
|
Evaluating: ++a3
|
|
|
|
updated a3 =
|
|
|
|
{
|
|
|
|
description : 31
|
|
|
|
type : number
|
|
|
|
value : 31
|
|
|
|
}
|
|
|
|
Evaluating: --a3
|
2017-06-14 14:18:16 +00:00
|
|
|
b3 =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 31
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 31
|
|
|
|
}
|
|
|
|
Evaluating: ++b3
|
|
|
|
updated b3 =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 32
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 32
|
|
|
|
}
|
|
|
|
Evaluating: --b3
|
|
|
|
|
|
|
|
Running test: testAnother
|
|
|
|
(anonymous) (module4:5:13)
|
|
|
|
bar (module4:5:24)
|
|
|
|
(anonymous) (module4:7:0)
|
2018-06-18 11:12:57 +00:00
|
|
|
local
|
2017-06-14 14:18:16 +00:00
|
|
|
[
|
|
|
|
]
|
|
|
|
closure:bar
|
|
|
|
[
|
|
|
|
[0] : a = 0
|
|
|
|
]
|
|
|
|
global
|
|
|
|
[
|
|
|
|
...
|
|
|
|
]
|
|
|
|
Check variables in frame#0
|
|
|
|
let a = 0;
|
|
|
|
(() => {a; #debugger;})();
|
|
|
|
};
|
|
|
|
|
|
|
|
Array =
|
|
|
|
{
|
|
|
|
className : Function
|
|
|
|
description : function Array() { [native code] }
|
|
|
|
objectId : <objectId>
|
|
|
|
type : function
|
|
|
|
}
|
|
|
|
a =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 0
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 0
|
|
|
|
}
|
|
|
|
Evaluating: ++a
|
|
|
|
updated a =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 1
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 1
|
|
|
|
}
|
|
|
|
Evaluating: --a
|
|
|
|
local:bar
|
|
|
|
[
|
|
|
|
[0] : a = 0
|
|
|
|
]
|
|
|
|
global
|
|
|
|
[
|
|
|
|
...
|
|
|
|
]
|
|
|
|
Check variables in frame#1
|
|
|
|
let a = 0;
|
|
|
|
(() => {a; debugger;})#();
|
|
|
|
};
|
|
|
|
|
|
|
|
Array =
|
|
|
|
{
|
|
|
|
className : Function
|
|
|
|
description : function Array() { [native code] }
|
|
|
|
objectId : <objectId>
|
|
|
|
type : function
|
|
|
|
}
|
|
|
|
a =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 0
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 0
|
|
|
|
}
|
|
|
|
Evaluating: ++a
|
|
|
|
updated a =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 1
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 1
|
|
|
|
}
|
|
|
|
Evaluating: --a
|
2018-06-18 08:39:57 +00:00
|
|
|
module
|
|
|
|
[
|
|
|
|
[0] : a = 1
|
|
|
|
[1] : b = 2
|
|
|
|
[2] : bar = function bar() { let a = 0; (() => {a; debugger;})(); }
|
|
|
|
]
|
2017-06-14 14:18:16 +00:00
|
|
|
global
|
|
|
|
[
|
|
|
|
...
|
|
|
|
]
|
|
|
|
Check variables in frame#2
|
|
|
|
};
|
|
|
|
#bar();
|
|
|
|
|
|
|
|
Array =
|
|
|
|
{
|
|
|
|
className : Function
|
|
|
|
description : function Array() { [native code] }
|
|
|
|
objectId : <objectId>
|
|
|
|
type : function
|
|
|
|
}
|
2018-06-18 08:39:57 +00:00
|
|
|
a =
|
|
|
|
{
|
|
|
|
description : 1
|
|
|
|
type : number
|
|
|
|
value : 1
|
|
|
|
}
|
|
|
|
Evaluating: ++a
|
|
|
|
updated a =
|
|
|
|
{
|
|
|
|
description : 2
|
|
|
|
type : number
|
|
|
|
value : 2
|
|
|
|
}
|
|
|
|
Evaluating: --a
|
|
|
|
b =
|
|
|
|
{
|
|
|
|
description : 2
|
|
|
|
type : number
|
|
|
|
value : 2
|
|
|
|
}
|
|
|
|
Evaluating: ++b
|
|
|
|
updated b =
|
|
|
|
{
|
|
|
|
description : 3
|
|
|
|
type : number
|
|
|
|
value : 3
|
|
|
|
}
|
|
|
|
Evaluating: --b
|
|
|
|
bar =
|
|
|
|
{
|
|
|
|
className : Function
|
|
|
|
description : function bar() { let a = 0; (() => {a; debugger;})(); }
|
|
|
|
objectId : <objectId>
|
|
|
|
type : function
|
|
|
|
}
|
2017-06-14 14:18:16 +00:00
|
|
|
|
|
|
|
Running test: testDifferentModuleVariables
|
|
|
|
(anonymous) (module5:5:0)
|
|
|
|
module
|
|
|
|
[
|
|
|
|
[0] : b2 = 21
|
|
|
|
[1] : a = 0
|
|
|
|
[2] : b = 0
|
|
|
|
[3] : c = 0
|
|
|
|
]
|
|
|
|
global
|
|
|
|
[
|
|
|
|
...
|
|
|
|
]
|
|
|
|
Check variables in frame#0
|
|
|
|
export var c = 0;
|
|
|
|
#debugger;
|
|
|
|
|
|
|
|
|
|
|
|
Array =
|
|
|
|
{
|
|
|
|
className : Function
|
|
|
|
description : function Array() { [native code] }
|
|
|
|
objectId : <objectId>
|
|
|
|
type : function
|
|
|
|
}
|
|
|
|
b2 =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 21
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 21
|
|
|
|
}
|
|
|
|
Evaluating: ++b2
|
|
|
|
updated b2 =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 21
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 21
|
|
|
|
}
|
|
|
|
Evaluating: --b2
|
|
|
|
a =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 0
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 0
|
|
|
|
}
|
|
|
|
Evaluating: ++a
|
|
|
|
updated a =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 0
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 0
|
|
|
|
}
|
|
|
|
Evaluating: --a
|
|
|
|
b =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 0
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 0
|
|
|
|
}
|
|
|
|
Evaluating: ++b
|
|
|
|
updated b =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 1
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 1
|
|
|
|
}
|
|
|
|
Evaluating: --b
|
|
|
|
c =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 0
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 0
|
|
|
|
}
|
|
|
|
Evaluating: ++c
|
|
|
|
updated c =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 1
|
2017-06-14 14:18:16 +00:00
|
|
|
type : number
|
|
|
|
value : 1
|
|
|
|
}
|
|
|
|
Evaluating: --c
|
2017-12-07 09:45:45 +00:00
|
|
|
|
|
|
|
Running test: testCapturedLocalVariable
|
|
|
|
(anonymous) (module6:2:25)
|
|
|
|
(anonymous) (module6:2:37)
|
|
|
|
local
|
|
|
|
[
|
|
|
|
[0] : y = 5
|
|
|
|
]
|
|
|
|
module
|
|
|
|
[
|
|
|
|
[0] : x = 5
|
|
|
|
]
|
|
|
|
global
|
|
|
|
[
|
|
|
|
...
|
|
|
|
]
|
|
|
|
Check variables in frame#0
|
|
|
|
let x = 5;
|
|
|
|
(function() { let y = x; #debugger; })()
|
|
|
|
|
|
|
|
|
|
|
|
Array =
|
|
|
|
{
|
|
|
|
className : Function
|
|
|
|
description : function Array() { [native code] }
|
|
|
|
objectId : <objectId>
|
|
|
|
type : function
|
|
|
|
}
|
|
|
|
y =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 5
|
2017-12-07 09:45:45 +00:00
|
|
|
type : number
|
|
|
|
value : 5
|
|
|
|
}
|
|
|
|
Evaluating: ++y
|
|
|
|
updated y =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 6
|
2017-12-07 09:45:45 +00:00
|
|
|
type : number
|
|
|
|
value : 6
|
|
|
|
}
|
|
|
|
Evaluating: --y
|
|
|
|
x =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 5
|
2017-12-07 09:45:45 +00:00
|
|
|
type : number
|
|
|
|
value : 5
|
|
|
|
}
|
|
|
|
Evaluating: ++x
|
|
|
|
updated x =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 6
|
2017-12-07 09:45:45 +00:00
|
|
|
type : number
|
|
|
|
value : 6
|
|
|
|
}
|
|
|
|
Evaluating: --x
|
|
|
|
module
|
|
|
|
[
|
|
|
|
[0] : x = 5
|
|
|
|
]
|
|
|
|
global
|
|
|
|
[
|
|
|
|
...
|
|
|
|
]
|
|
|
|
Check variables in frame#1
|
|
|
|
let x = 5;
|
|
|
|
(function() { let y = x; debugger; })#()
|
|
|
|
|
|
|
|
|
|
|
|
Array =
|
|
|
|
{
|
|
|
|
className : Function
|
|
|
|
description : function Array() { [native code] }
|
|
|
|
objectId : <objectId>
|
|
|
|
type : function
|
|
|
|
}
|
|
|
|
x =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 5
|
2017-12-07 09:45:45 +00:00
|
|
|
type : number
|
|
|
|
value : 5
|
|
|
|
}
|
|
|
|
Evaluating: ++x
|
|
|
|
updated x =
|
|
|
|
{
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 6
|
2017-12-07 09:45:45 +00:00
|
|
|
type : number
|
|
|
|
value : 6
|
|
|
|
}
|
|
|
|
Evaluating: --x
|
|
|
|
|
|
|
|
Running test: testLocalVariableToplevel
|
|
|
|
(anonymous) (module7:2:0)
|
2018-06-18 08:39:57 +00:00
|
|
|
module
|
|
|
|
[
|
|
|
|
[0] : x = 5
|
|
|
|
]
|
2017-12-07 09:45:45 +00:00
|
|
|
global
|
|
|
|
[
|
|
|
|
...
|
|
|
|
]
|
|
|
|
Check variables in frame#0
|
|
|
|
let x = 5;
|
|
|
|
#debugger;
|
|
|
|
|
|
|
|
|
|
|
|
Array =
|
|
|
|
{
|
|
|
|
className : Function
|
|
|
|
description : function Array() { [native code] }
|
|
|
|
objectId : <objectId>
|
|
|
|
type : function
|
|
|
|
}
|
2018-06-18 08:39:57 +00:00
|
|
|
x =
|
|
|
|
{
|
|
|
|
description : 5
|
|
|
|
type : number
|
|
|
|
value : 5
|
|
|
|
}
|
|
|
|
Evaluating: ++x
|
|
|
|
updated x =
|
|
|
|
{
|
|
|
|
description : 6
|
|
|
|
type : number
|
|
|
|
value : 6
|
|
|
|
}
|
|
|
|
Evaluating: --x
|