Procházet zdrojové kódy

Move debugger tests from full to core

Sandeep Agarwal před 9 roky
rodič
revize
9f7f06cdee
100 změnil soubory, kde provedl 6453 přidání a 1 odebrání
  1. 1 1
      bin/ch/DbgController.js
  2. 59 0
      test/DebuggerCommon/ComputedPropertyNames.js
  3. 220 0
      test/DebuggerCommon/ComputedPropertyNames.js.dbg.baseline
  4. 57 0
      test/DebuggerCommon/ConsoleScope.js
  5. 27 0
      test/DebuggerCommon/ConsoleScope.js.baseline
  6. 112 0
      test/DebuggerCommon/ConsoleScope.js.dbg.baseline
  7. 27 0
      test/DebuggerCommon/ConsoleScopePMSpec.js
  8. 8 0
      test/DebuggerCommon/ConsoleScopePMSpec.js.baseline
  9. 42 0
      test/DebuggerCommon/ConsoleScopePMSpec.js.dbg.baseline
  10. 21 0
      test/DebuggerCommon/FastF12_BOBranch.js
  11. 46 0
      test/DebuggerCommon/FastF12_BOBranch.js.dbg.baseline
  12. 33 0
      test/DebuggerCommon/JIT_localsAtNativeFrame1.js
  13. 250 0
      test/DebuggerCommon/JIT_localsAtNativeFrame1.js.dbg.baseline
  14. 89 0
      test/DebuggerCommon/JIT_localsAtNativeFrame2.js
  15. 998 0
      test/DebuggerCommon/JIT_localsAtNativeFrame2.js.dbg.baseline
  16. 56 0
      test/DebuggerCommon/ObjLit_step_into_more.js
  17. 1 0
      test/DebuggerCommon/ObjLit_step_into_more.js.baseline
  18. 217 0
      test/DebuggerCommon/ObjLit_step_into_more.js.dbg.baseline
  19. 31 0
      test/DebuggerCommon/ObjLit_step_into_out.js
  20. 1 0
      test/DebuggerCommon/ObjLit_step_into_out.js.baseline
  21. 134 0
      test/DebuggerCommon/ObjLit_step_into_out.js.dbg.baseline
  22. 29 0
      test/DebuggerCommon/ObjLit_step_over.js
  23. 1 0
      test/DebuggerCommon/ObjLit_step_over.js.baseline
  24. 93 0
      test/DebuggerCommon/ObjLit_step_over.js.dbg.baseline
  25. 29 0
      test/DebuggerCommon/TypedArray.js
  26. 350 0
      test/DebuggerCommon/TypedArray.js.dbg.baseline
  27. 676 0
      test/DebuggerCommon/array_protoTest.js.dbg.baseline
  28. 55 0
      test/DebuggerCommon/array_prototest.js
  29. 34 0
      test/DebuggerCommon/arraytoes5array.js
  30. 23 0
      test/DebuggerCommon/arraytoes5array.js.dbg.baseline
  31. 25 0
      test/DebuggerCommon/attachAfterException.js
  32. 22 0
      test/DebuggerCommon/attachAfterException.js.dbg.baseline
  33. 41 0
      test/DebuggerCommon/attachWithDeferParse.js
  34. 125 0
      test/DebuggerCommon/attachWithDeferParse.js.dbg.baseline
  35. 28 0
      test/DebuggerCommon/attachdetach-delaycapture.js
  36. 1 0
      test/DebuggerCommon/attachdetach-delaycapture.js.dbg.baseline
  37. 17 0
      test/DebuggerCommon/blockScopeActivationObjectAsSlotArray.js
  38. 43 0
      test/DebuggerCommon/blockScopeActivationObjectAsSlotArray.js.dbg.baseline
  39. 29 0
      test/DebuggerCommon/blockScopeActivationObjectCapture.js
  40. 97 0
      test/DebuggerCommon/blockScopeActivationObjectCapture.js.dbg.baseline
  41. 15 0
      test/DebuggerCommon/blockScopeActivationObjectDeadZoneTest.js
  42. 38 0
      test/DebuggerCommon/blockScopeActivationObjectDeadZoneTest.js.dbg.baseline
  43. 17 0
      test/DebuggerCommon/blockScopeBasicLetConstTest.js
  44. 121 0
      test/DebuggerCommon/blockScopeBasicLetConstTest.js.dbg.baseline
  45. 30 0
      test/DebuggerCommon/blockScopeBasicScopingTest.js
  46. 29 0
      test/DebuggerCommon/blockScopeBasicScopingTest.js.dbg.baseline
  47. 26 0
      test/DebuggerCommon/blockScopeDeadZoneTest.js
  48. 51 0
      test/DebuggerCommon/blockScopeDeadZoneTest.js.dbg.baseline
  49. 13 0
      test/DebuggerCommon/blockScopeEvalTest.js
  50. 1 0
      test/DebuggerCommon/blockScopeEvalTest.js.dbg.baseline
  51. 42 0
      test/DebuggerCommon/blockScopeExpressionEquationDeadZoneTest.js
  52. 116 0
      test/DebuggerCommon/blockScopeExpressionEquationDeadZoneTest.js.dbg.baseline
  53. 20 0
      test/DebuggerCommon/blockScopeExpressionNoWriteOfConst.js
  54. 22 0
      test/DebuggerCommon/blockScopeExpressionNoWriteOfConst.js.dbg.baseline
  55. 21 0
      test/DebuggerCommon/blockScopeExpressionSimpleDeadZoneTest.js
  56. 22 0
      test/DebuggerCommon/blockScopeExpressionSimpleDeadZoneTest.js.dbg.baseline
  57. 16 0
      test/DebuggerCommon/blockScopeForTest.bug183991.js
  58. 42 0
      test/DebuggerCommon/blockScopeForTest.bug183991.js.dbg.baseline
  59. 17 0
      test/DebuggerCommon/blockScopeForTest.js
  60. 21 0
      test/DebuggerCommon/blockScopeForTest.js.dbg.baseline
  61. 21 0
      test/DebuggerCommon/blockScopeFunctionDeclarationActivationObjectTest.js
  62. 26 0
      test/DebuggerCommon/blockScopeFunctionDeclarationActivationObjectTest.js.dbg.baseline
  63. 20 0
      test/DebuggerCommon/blockScopeFunctionDeclarationGlobalShadowingTest.bug305562.js
  64. 17 0
      test/DebuggerCommon/blockScopeFunctionDeclarationGlobalShadowingTest.bug305562.js.dbg.baseline
  65. 41 0
      test/DebuggerCommon/blockScopeFunctionDeclarationGlobalShadowingTest.bug308191.js
  66. 27 0
      test/DebuggerCommon/blockScopeFunctionDeclarationGlobalShadowingTest.bug308191.js.dbg.baseline
  67. 16 0
      test/DebuggerCommon/blockScopeFunctionDeclarationGlobalTest.js
  68. 23 0
      test/DebuggerCommon/blockScopeFunctionDeclarationGlobalTest.js.dbg.baseline
  69. 20 0
      test/DebuggerCommon/blockScopeFunctionDeclarationRegSlotTest.js
  70. 26 0
      test/DebuggerCommon/blockScopeFunctionDeclarationRegSlotTest.js.dbg.baseline
  71. 24 0
      test/DebuggerCommon/blockScopeFunctionDeclarationSlotArrayTest.js
  72. 29 0
      test/DebuggerCommon/blockScopeFunctionDeclarationSlotArrayTest.js.dbg.baseline
  73. 27 0
      test/DebuggerCommon/blockScopeFunctionRedeclarationTest.js
  74. 9 0
      test/DebuggerCommon/blockScopeFunctionRedeclarationTest.js.dbg.baseline
  75. 20 0
      test/DebuggerCommon/blockScopeFunctionRedeclaration_blue523098.js
  76. 10 0
      test/DebuggerCommon/blockScopeFunctionRedeclaration_blue523098.js.dbg.baseline
  77. 15 0
      test/DebuggerCommon/blockScopeGlobalBlockTest.js
  78. 34 0
      test/DebuggerCommon/blockScopeGlobalBlockTest.js.dbg.baseline
  79. 11 0
      test/DebuggerCommon/blockScopeGlobalDeadZoneTest.js
  80. 33 0
      test/DebuggerCommon/blockScopeGlobalDeadZoneTest.js.dbg.baseline
  81. 30 0
      test/DebuggerCommon/blockScopeGlobalSlotArrayTest.bug222631.js
  82. 52 0
      test/DebuggerCommon/blockScopeGlobalSlotArrayTest.bug222631.js.dbg.baseline
  83. 24 0
      test/DebuggerCommon/blockScopeGlobalTest.js
  84. 48 0
      test/DebuggerCommon/blockScopeGlobalTest.js.dbg.baseline
  85. 35 0
      test/DebuggerCommon/blockScopeNestedFunctionTest.js
  86. 199 0
      test/DebuggerCommon/blockScopeNestedFunctionTest.js.dbg.baseline
  87. 15 0
      test/DebuggerCommon/blockScopeRegSlotDeadZoneTest.js
  88. 38 0
      test/DebuggerCommon/blockScopeRegSlotDeadZoneTest.js.dbg.baseline
  89. 29 0
      test/DebuggerCommon/blockScopeRegSlotShadowingExpressionEvaluationTest.js
  90. 7 0
      test/DebuggerCommon/blockScopeRegSlotShadowingExpressionEvaluationTest.js.dbg.baseline
  91. 115 0
      test/DebuggerCommon/blockScopeSibling.bug263635.js
  92. 167 0
      test/DebuggerCommon/blockScopeSibling.bug263635.js.dbg.baseline
  93. 32 0
      test/DebuggerCommon/blockScopeSiblingScopeTrackedInNonDebugMode.bug321751.js
  94. 1 0
      test/DebuggerCommon/blockScopeSiblingScopeTrackedInNonDebugMode.bug321751.js.dbg.baseline
  95. 52 0
      test/DebuggerCommon/blockScopeSlotArrayCapture.js
  96. 101 0
      test/DebuggerCommon/blockScopeSlotArrayCapture.js.dbg.baseline
  97. 57 0
      test/DebuggerCommon/blockScopeSlotArrayCaptureAttach.js
  98. 107 0
      test/DebuggerCommon/blockScopeSlotArrayCaptureAttach.js.dbg.baseline
  99. 20 0
      test/DebuggerCommon/blockScopeSlotArrayDeadZoneTest.js
  100. 47 0
      test/DebuggerCommon/blockScopeSlotArrayDeadZoneTest.js.dbg.baseline

+ 1 - 1
bin/ch/DbgController.js

@@ -632,7 +632,7 @@ var controllerObj = (function () {
                 internalPrint("LOG: " + str);
             },
             logJson: function (str) {
-                internalPrint(str);
+                recordEvent({ log: str });
             },
             resume: function (kind) {
                 if (_wasResumed) {

+ 59 - 0
test/DebuggerCommon/ComputedPropertyNames.js

@@ -0,0 +1,59 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+function f() {
+    return "f";
+}
+
+function g() {
+    return "g";
+}
+
+// Step to var o statement, then step into each of the calls to f and g
+// verifying that stepping into and out of calls contained in computed
+// properties behaves correctly and the stack trace is sane.
+// This case is at the global scope.
+f; /**bp:resume('step_into');
+     stack();resume('step_into');
+     stack();resume('step_out');
+     resume('step_into');
+
+     stack();resume('step_into');
+     stack();resume('step_out');
+
+     stack();resume('step_into');
+     stack();resume('step_out');
+
+     stack();
+     **/
+var o = {
+    [f()]: 1,
+    [f() + g()]: 2
+}
+
+function test() {
+    // Verify stepping and the stack again, as above, but in function scope.
+    f; /**bp:resume('step_into');
+         stack();resume('step_into');
+         stack();resume('step_out');
+         resume('step_into');
+
+         stack();resume('step_into');
+         stack();resume('step_out');
+
+         stack();resume('step_into');
+         stack();resume('step_out');
+
+         stack();
+         **/
+    var o = {
+        [f()]: 1,
+        [f() + g()]: 2
+    }
+}
+
+test();
+
+WScript.Echo("passed");

+ 220 - 0
test/DebuggerCommon/ComputedPropertyNames.js.dbg.baseline

@@ -0,0 +1,220 @@
+[
+  {
+    "callStack": [
+      {
+        "line": 30,
+        "column": 0,
+        "sourceText": "var o = {\r\n    [f()]: 1,\r\n    [f() + g()]: 2\r\n}",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 6,
+        "column": 4,
+        "sourceText": "return \"f\"",
+        "function": "f"
+      },
+      {
+        "line": 31,
+        "column": 5,
+        "sourceText": "f()]: 1",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 32,
+        "column": 5,
+        "sourceText": "f() + g()]: 2",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 6,
+        "column": 4,
+        "sourceText": "return \"f\"",
+        "function": "f"
+      },
+      {
+        "line": 32,
+        "column": 5,
+        "sourceText": "f() + g()]: 2",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 32,
+        "column": 5,
+        "sourceText": "f() + g()]: 2",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 10,
+        "column": 4,
+        "sourceText": "return \"g\"",
+        "function": "g"
+      },
+      {
+        "line": 32,
+        "column": 5,
+        "sourceText": "f() + g()]: 2",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 32,
+        "column": 5,
+        "sourceText": "f() + g()]: 2",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 50,
+        "column": 4,
+        "sourceText": "var o = {\r\n        [f()]: 1,\r\n        [f() + g()]: 2\r\n    }",
+        "function": "test"
+      },
+      {
+        "line": 56,
+        "column": 0,
+        "sourceText": "test()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 6,
+        "column": 4,
+        "sourceText": "return \"f\"",
+        "function": "f"
+      },
+      {
+        "line": 51,
+        "column": 9,
+        "sourceText": "f()]: 1",
+        "function": "test"
+      },
+      {
+        "line": 56,
+        "column": 0,
+        "sourceText": "test()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 52,
+        "column": 9,
+        "sourceText": "f() + g()]: 2",
+        "function": "test"
+      },
+      {
+        "line": 56,
+        "column": 0,
+        "sourceText": "test()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 6,
+        "column": 4,
+        "sourceText": "return \"f\"",
+        "function": "f"
+      },
+      {
+        "line": 52,
+        "column": 9,
+        "sourceText": "f() + g()]: 2",
+        "function": "test"
+      },
+      {
+        "line": 56,
+        "column": 0,
+        "sourceText": "test()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 52,
+        "column": 9,
+        "sourceText": "f() + g()]: 2",
+        "function": "test"
+      },
+      {
+        "line": 56,
+        "column": 0,
+        "sourceText": "test()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 10,
+        "column": 4,
+        "sourceText": "return \"g\"",
+        "function": "g"
+      },
+      {
+        "line": 52,
+        "column": 9,
+        "sourceText": "f() + g()]: 2",
+        "function": "test"
+      },
+      {
+        "line": 56,
+        "column": 0,
+        "sourceText": "test()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 52,
+        "column": 9,
+        "sourceText": "f() + g()]: 2",
+        "function": "test"
+      },
+      {
+        "line": 56,
+        "column": 0,
+        "sourceText": "test()",
+        "function": "Global code"
+      }
+    ]
+  }
+]

+ 57 - 0
test/DebuggerCommon/ConsoleScope.js

@@ -0,0 +1,57 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+var a = 1;/**bp:evaluate("var varProp = 'varProp';let letProp = 'letProp';const constProp = 'constProp';function func() {return 0;};nonVarProp = 'nonVarProp';class class1{foo(){return 0;}};")**/
+
+// New properties added in console eval scope shouldn't be available in user context
+var propList = ["varProp", "letProp", "constProp", "func", "nonVarProp", "class1"];
+for (var i = 0; i < propList.length; ++i) {
+    var evalStr = "typeof " + propList[i] + " == 'undefined'";
+    WScript.Echo(evalStr + " : " + eval(evalStr));
+}
+
+// New properties added in previous console eval scope should be available in subsequent console eval context
+a = 2;/**bp:evaluate("WScript.Echo(varProp == 'varProp');WScript.Echo(letProp == 'letProp');WScript.Echo(constProp == 'constProp');WScript.Echo(nonVarProp == 'nonVarProp');");**/
+a = 2;/**bp:evaluate("WScript.Echo(func() == 0);");**/
+a = 2;/**bp:evaluate("WScript.Echo((new class1()).foo() == 0);");**/
+
+// Same named let/const across multiple console eval invocation are treated as different but the last update wins in console scope
+var a = 1;/**bp:evaluate("var varProp = 'varProp1';let letProp = 'letProp1';const constProp = 'constProp1';function func() {return 1;};nonVarProp = 'nonVarProp1';class class1{foo(){return 1;}};")**/
+a = 2;/**bp:evaluate("WScript.Echo(varProp == 'varProp1');WScript.Echo(letProp == 'letProp1');WScript.Echo(constProp == 'constProp1');WScript.Echo(nonVarProp == 'nonVarProp1');");**/
+a = 2;/**bp:evaluate("WScript.Echo(func() == 1);");**/
+a = 2;/**bp:evaluate("WScript.Echo((new class1()).foo() == 1);");**/
+
+// Only top level let/const should be available across multiple console eval invocation
+var a = 1;/**bp:evaluate("let letProp1 = 1;const constProp1 = 1;{let letProp2 = 2;const constProp2 = 2;}")**/
+
+propList = ["letProp2", "constProp2"];
+for (var i = 0; i < propList.length; ++i) {
+    var evalStr = "typeof " + propList[i] + " == 'undefined'";
+    WScript.Echo(evalStr + " : " + eval(evalStr));
+}
+
+a = 1;/**bp:evaluate("WScript.Echo(typeof letProp2 == 'undefined');")**/
+a = 1;/**bp:evaluate("WScript.Echo(typeof constProp2 == 'undefined');")**/
+
+
+// Deleting Console scope variable should delete them
+a = 2; /**bp:evaluate("delete letProp1;delete constProp1;")**/
+a = 2; /**bp:evaluate("WScript.Echo(typeof letProp1 == 'undefined');")**/
+a = 2; /**bp:evaluate("WScript.Echo(typeof constProp1 == 'undefined');")**/
+
+a = 2; /**bp:evaluate("var varProp1 = 1;delete varProp1;let letProp1 = 1;delete letProp1;const constProp1 = 1;delete constProp1;")**/
+a = 2; /**bp:evaluate("WScript.Echo(typeof varProp1 == 'undefined');")**/
+a = 2; /**bp:evaluate("WScript.Echo(typeof letProp1 == 'undefined');")**/
+a = 2; /**bp:evaluate("WScript.Echo(typeof constProp1 == 'undefined');")**/
+
+// Redeclaration of let/const should throw redeclaration error
+var a = 1;/**bp:evaluate("let letProp = 'letProp';let letProp = 'letPropReDecl';")**/
+a = 2;/**bp:evaluate("const constProp = 'constProp';const constProp = 'constPropReDecl';")**/
+
+// Same named let/const as user scope should not throw 'Use before declaration' error in console eval as it has its own scope
+let userLet = 1;
+a = 2;/**bp:evaluate("let userLet = 'userLetReDecl';")**/
+const userConst = 1;
+a = 2;/**bp:evaluate("const userConst = 'userConstReDecl';")**/

+ 27 - 0
test/DebuggerCommon/ConsoleScope.js.baseline

@@ -0,0 +1,27 @@
+typeof varProp == 'undefined' : true
+typeof letProp == 'undefined' : true
+typeof constProp == 'undefined' : true
+typeof func == 'undefined' : true
+typeof nonVarProp == 'undefined' : true
+typeof class1 == 'undefined' : true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+typeof letProp2 == 'undefined' : true
+typeof constProp2 == 'undefined' : true
+true
+true
+true
+true
+true
+true
+true

+ 112 - 0
test/DebuggerCommon/ConsoleScope.js.dbg.baseline

@@ -0,0 +1,112 @@
+[
+  {
+    "evaluate": {
+      "var varProp = 'varProp';let letProp = 'letProp';const constProp = 'constProp';function func() {return 0;};nonVarProp = 'nonVarProp';class class1{foo(){return 0;}};": "function <large string>"
+    }
+  },
+  {
+    "evaluate": {
+      "WScript.Echo(varProp == 'varProp');WScript.Echo(letProp == 'letProp');WScript.Echo(constProp == 'constProp');WScript.Echo(nonVarProp == 'nonVarProp');": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "WScript.Echo(func() == 0);": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "WScript.Echo((new class1()).foo() == 0);": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "var varProp = 'varProp1';let letProp = 'letProp1';const constProp = 'constProp1';function func() {return 1;};nonVarProp = 'nonVarProp1';class class1{foo(){return 1;}};": "function <large string>"
+    }
+  },
+  {
+    "evaluate": {
+      "WScript.Echo(varProp == 'varProp1');WScript.Echo(letProp == 'letProp1');WScript.Echo(constProp == 'constProp1');WScript.Echo(nonVarProp == 'nonVarProp1');": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "WScript.Echo(func() == 1);": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "WScript.Echo((new class1()).foo() == 1);": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "let letProp1 = 1;const constProp1 = 1;{let letProp2 = 2;const constProp2 = 2;}": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "WScript.Echo(typeof letProp2 == 'undefined');": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "WScript.Echo(typeof constProp2 == 'undefined');": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "delete letProp1;delete constProp1;": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "WScript.Echo(typeof letProp1 == 'undefined');": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "WScript.Echo(typeof constProp1 == 'undefined');": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "var varProp1 = 1;delete varProp1;let letProp1 = 1;delete letProp1;const constProp1 = 1;delete constProp1;": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "WScript.Echo(typeof varProp1 == 'undefined');": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "WScript.Echo(typeof letProp1 == 'undefined');": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "WScript.Echo(typeof constProp1 == 'undefined');": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "let letProp = 'letProp';let letProp = 'letPropReDecl';": "Error <large string>"
+    }
+  },
+  {
+    "evaluate": {
+      "const constProp = 'constProp';const constProp = 'constPropReDecl';": "Error <large string>"
+    }
+  },
+  {
+    "evaluate": {
+      "let userLet = 'userLetReDecl';": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "const userConst = 'userConstReDecl';": "undefined undefined"
+    }
+  }
+]

+ 27 - 0
test/DebuggerCommon/ConsoleScopePMSpec.js

@@ -0,0 +1,27 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// The app code can let-declare a variable that shadows a variable previously declared in the console. The variable in app code shadows the variable defined in the console.
+// When a scope containing let/const-declared variables is exited, any variables created in the scope become undefined, and any variables shadowed in the scope go back to 
+// their values from before that scope was entered.
+var a = 1; /**bp:evaluate("let x = 1;")**/
+function someFuncThatsCalled() {
+    a = 2; /**bp:evaluate("let y = 1;let z = 1;")**/
+    let x = 2;
+    let y = 2;
+    a = 2; /**bp:evaluate("WScript.Echo(x == 2);WScript.Echo(y === 2);")**/
+}
+someFuncThatsCalled();
+a = 2; /**bp:evaluate("WScript.Echo(x == 1);")**/
+a = 2; /**bp:evaluate("WScript.Echo(y == 1);")**/
+a = 2; /**bp:evaluate("WScript.Echo(z == 1);")**/
+
+// If you define a closure in the console that closes over a let-bound variable in app code, this closure still "works" even when the scope of the let-bound variable ends.
+function someFuncThatsRunning() {
+    let x1 = 1;
+    a = 2; /**bp:evaluate("var myClosure=function(){x1+=1;return x1;};WScript.Echo(myClosure() == 2);WScript.Echo(myClosure() == 3);")**/
+}
+someFuncThatsRunning();
+a = 2; /**bp:evaluate("WScript.Echo(myClosure() == 4);")**/

+ 8 - 0
test/DebuggerCommon/ConsoleScopePMSpec.js.baseline

@@ -0,0 +1,8 @@
+true
+true
+true
+true
+true
+true
+true
+true

+ 42 - 0
test/DebuggerCommon/ConsoleScopePMSpec.js.dbg.baseline

@@ -0,0 +1,42 @@
+[
+  {
+    "evaluate": {
+      "let x = 1;": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "let y = 1;let z = 1;": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "WScript.Echo(x == 2);WScript.Echo(y === 2);": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "WScript.Echo(x == 1);": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "WScript.Echo(y == 1);": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "WScript.Echo(z == 1);": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "var myClosure=function(){x1+=1;return x1;};WScript.Echo(myClosure() == 2);WScript.Echo(myClosure() == 3);": "undefined undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "WScript.Echo(myClosure() == 4);": "undefined undefined"
+    }
+  }
+]

+ 21 - 0
test/DebuggerCommon/FastF12_BOBranch.js

@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// WinBlue 218307: loop condition branch becomes dead as condition is always true.
+// Make sure that the branch and b/o for debugger on it aren't splitted into separate blocks,
+// and that StatementBoundary pragmas are processed correctly for RecordThrowMap.
+
+function test0(){
+  var d = 1;
+  function bar3 (){
+    e = 1; /**bp:stack();**/
+  }
+  for(var i = 0; i < 1 && bar3.call(); i++) {
+    Math.sin();
+  }
+};
+test0(); 
+test0(); 
+WScript.Echo("PASS");

+ 46 - 0
test/DebuggerCommon/FastF12_BOBranch.js.dbg.baseline

@@ -0,0 +1,46 @@
+[
+  {
+    "callStack": [
+      {
+        "line": 12,
+        "column": 4,
+        "sourceText": "e = 1",
+        "function": "bar3"
+      },
+      {
+        "line": 14,
+        "column": 17,
+        "sourceText": "i < 1 && bar3.call()",
+        "function": "test0"
+      },
+      {
+        "line": 18,
+        "column": 0,
+        "sourceText": "test0()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 12,
+        "column": 4,
+        "sourceText": "e = 1",
+        "function": "bar3"
+      },
+      {
+        "line": 14,
+        "column": 17,
+        "sourceText": "i < 1 && bar3.call()",
+        "function": "test0"
+      },
+      {
+        "line": 19,
+        "column": 0,
+        "sourceText": "test0()",
+        "function": "Global code"
+      }
+    ]
+  }
+]

+ 33 - 0
test/DebuggerCommon/JIT_localsAtNativeFrame1.js

@@ -0,0 +1,33 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Validating simple locals inspection at lower stack frame.
+
+function F1() {
+    var a = new Array;                       
+    var sub = -10;                            /**bp:stack();locals();setFrame(1);locals();setFrame(2);locals();setFrame(3);locals();**/
+    return a.length;
+}
+
+function F2(a1)
+{
+    var j = 10;
+    var j1 = {x:"x", y : 31};
+    var m = 20 + a1.toString();                           
+    F1();
+}
+
+function Run(arg1)
+{
+    F2(arg1);
+}
+
+Run(12);
+Run([3,5,8])
+Run({a:"aa"});
+Run([3,5,8]);
+
+WScript.Echo("Pass");
+

+ 250 - 0
test/DebuggerCommon/JIT_localsAtNativeFrame1.js.dbg.baseline

@@ -0,0 +1,250 @@
+[
+  {
+    "callStack": [
+      {
+        "line": 9,
+        "column": 4,
+        "sourceText": "var sub = -10",
+        "function": "F1"
+      },
+      {
+        "line": 18,
+        "column": 4,
+        "sourceText": "F1()",
+        "function": "F2"
+      },
+      {
+        "line": 23,
+        "column": 4,
+        "sourceText": "F2(arg1)",
+        "function": "Run"
+      },
+      {
+        "line": 26,
+        "column": 0,
+        "sourceText": "Run(12)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "Array []",
+      "sub": "undefined undefined"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a1": "number 12",
+      "j": "number 10",
+      "j1": "Object {...}",
+      "m": "string 2012"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "arg1": "number 12"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "console": "Object {...}",
+      "F1": "function <large string>",
+      "F2": "function <large string>",
+      "Run": "function <large string>"
+    }
+  },
+  {
+    "callStack": [
+      {
+        "line": 9,
+        "column": 4,
+        "sourceText": "var sub = -10",
+        "function": "F1"
+      },
+      {
+        "line": 18,
+        "column": 4,
+        "sourceText": "F1()",
+        "function": "F2"
+      },
+      {
+        "line": 23,
+        "column": 4,
+        "sourceText": "F2(arg1)",
+        "function": "Run"
+      },
+      {
+        "line": 27,
+        "column": 0,
+        "sourceText": "Run([3,5,8])",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "Array []",
+      "sub": "undefined undefined"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a1": "Array [3,5,8]",
+      "j": "number 10",
+      "j1": "Object {...}",
+      "m": "string 203,5,8"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "arg1": "Array [3,5,8]"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "console": "Object {...}",
+      "F1": "function <large string>",
+      "F2": "function <large string>",
+      "Run": "function <large string>"
+    }
+  },
+  {
+    "callStack": [
+      {
+        "line": 9,
+        "column": 4,
+        "sourceText": "var sub = -10",
+        "function": "F1"
+      },
+      {
+        "line": 18,
+        "column": 4,
+        "sourceText": "F1()",
+        "function": "F2"
+      },
+      {
+        "line": 23,
+        "column": 4,
+        "sourceText": "F2(arg1)",
+        "function": "Run"
+      },
+      {
+        "line": 28,
+        "column": 0,
+        "sourceText": "Run({a:\"aa\"})",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "Array []",
+      "sub": "undefined undefined"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a1": "Object {...}",
+      "j": "number 10",
+      "j1": "Object {...}",
+      "m": "string <large string>"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "arg1": "Object {...}"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "console": "Object {...}",
+      "F1": "function <large string>",
+      "F2": "function <large string>",
+      "Run": "function <large string>"
+    }
+  },
+  {
+    "callStack": [
+      {
+        "line": 9,
+        "column": 4,
+        "sourceText": "var sub = -10",
+        "function": "F1"
+      },
+      {
+        "line": 18,
+        "column": 4,
+        "sourceText": "F1()",
+        "function": "F2"
+      },
+      {
+        "line": 23,
+        "column": 4,
+        "sourceText": "F2(arg1)",
+        "function": "Run"
+      },
+      {
+        "line": 29,
+        "column": 0,
+        "sourceText": "Run([3,5,8])",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "Array []",
+      "sub": "undefined undefined"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a1": "Array [3,5,8]",
+      "j": "number 10",
+      "j1": "Object {...}",
+      "m": "string 203,5,8"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "arg1": "Array [3,5,8]"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "console": "Object {...}",
+      "F1": "function <large string>",
+      "F2": "function <large string>",
+      "Run": "function <large string>"
+    }
+  }
+]

+ 89 - 0
test/DebuggerCommon/JIT_localsAtNativeFrame2.js

@@ -0,0 +1,89 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Validating locals at lower frames, it is exercising the fetching locals from the native (JITed) frames.
+
+function F2() {
+    var a = new Array;                       
+    for (var i = 0; i < 100; i++) {
+        a.push(i * 10.2);
+    }
+
+    var sub = -10;                            /**bp:stack();locals();setFrame(1);locals();setFrame(2);locals();setFrame(3);locals();setFrame(4);locals();setFrame(5);locals();**/
+    for (var i = 0; i < 100; i++) {
+        a[i] -= sub;
+    }
+    return a.length;
+}
+
+function F3(r) {
+    return 2 * 3.14 * r;
+}
+
+function F5() {
+    var x = 20;     
+    var y = {y1:1}; 
+    var t1 = Math.abs(22.2);
+    function F5_1(a) {
+        eval('var z = x * y.y1;');
+        var f6 = function () {
+            var b1 = 10;
+            var obj1 = {a1:2};
+            obj4 = F3(obj1.a1);
+            return b1 + F2();
+        }
+        f6();
+    }
+    F5_1(t1);
+    return y;
+}
+
+function F6(a,b) {
+    (function () {
+        var j = "Anonymous function2";
+        F5();
+        return j;                                    /**bp:stack();locals();setFrame(1);locals();setFrame(2);locals();setFrame(3);locals();**/
+    })();
+}
+
+function F7(a1)
+{
+    var j = 10;
+    var k = 20 * 1.34;
+    var m = 20 + a1;
+    function f2(b21, b22)
+    {
+        var j2 = arguments.length;
+        var k2 = 10;
+        function f3(c31,c32)
+        {
+            var a = 10;
+            a++;                            /**bp:stack();locals();setFrame(1);locals();setFrame(2);locals();setFrame(3);locals();**/
+            a++;                            
+            return c31+c32+a;               
+        }
+        
+        function f32()
+        {
+            j;
+        }
+        f3();
+    }
+    
+    f2(k);
+}
+
+function Run(arg1, arg2, arg3)
+{
+    F6(arg1, arg2);
+    F7(arg3);
+}
+
+Run(12, "assdf", 112);
+Run([3,5,8], {a:"aa"}, 21);
+Run(12, "assdf", 112);
+Run([3,5,8], {a:"aa"}, 21);
+
+WScript.Echo("Pass");

+ 998 - 0
test/DebuggerCommon/JIT_localsAtNativeFrame2.js.dbg.baseline

@@ -0,0 +1,998 @@
+[
+  {
+    "callStack": [
+      {
+        "line": 13,
+        "column": 4,
+        "sourceText": "var sub = -10",
+        "function": "F2"
+      },
+      {
+        "line": 34,
+        "column": 12,
+        "sourceText": "return b1 + F2()",
+        "function": "f6"
+      },
+      {
+        "line": 36,
+        "column": 8,
+        "sourceText": "f6()",
+        "function": "F5_1"
+      },
+      {
+        "line": 38,
+        "column": 4,
+        "sourceText": "F5_1(t1)",
+        "function": "F5"
+      },
+      {
+        "line": 45,
+        "column": 8,
+        "sourceText": "F5()",
+        "function": "Anonymous function"
+      },
+      {
+        "line": 43,
+        "column": 5,
+        "sourceText": "function () {\r\n        var j = \"Anonymous function2\";\r\n        F5();\r\n        return j;                                    /**bp:stack();locals();setFrame(1);locals();setFrame(2);locals();setFrame(3);locals();**/\r\n    })()",
+        "function": "F6"
+      },
+      {
+        "line": 79,
+        "column": 4,
+        "sourceText": "F6(arg1, arg2)",
+        "function": "Run"
+      },
+      {
+        "line": 83,
+        "column": 0,
+        "sourceText": "Run(12, \"assdf\", 112)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "Array [...]",
+      "i": "number 100",
+      "sub": "undefined undefined"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "b1": "number 10",
+      "obj1": "Object {...}"
+    },
+    "scopes0": "undefined undefined",
+    "scopes1": "undefined undefined"
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "a": "number 22.2",
+      "arguments": "Object {...}",
+      "f6": "function <large string>",
+      "z": "number 20"
+    },
+    "scopes0": "undefined undefined"
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "F5_1": "function <large string>",
+      "x": "number 20",
+      "y": "Object {...}",
+      "t1": "number 22.2"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "j": "string <large string>"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "number 12",
+      "b": "string assdf"
+    }
+  },
+  {
+    "callStack": [
+      {
+        "line": 46,
+        "column": 8,
+        "sourceText": "return j",
+        "function": "Anonymous function"
+      },
+      {
+        "line": 43,
+        "column": 5,
+        "sourceText": "function () {\r\n        var j = \"Anonymous function2\";\r\n        F5();\r\n        return j;                                    /**bp:stack();locals();setFrame(1);locals();setFrame(2);locals();setFrame(3);locals();**/\r\n    })()",
+        "function": "F6"
+      },
+      {
+        "line": 79,
+        "column": 4,
+        "sourceText": "F6(arg1, arg2)",
+        "function": "Run"
+      },
+      {
+        "line": 83,
+        "column": 0,
+        "sourceText": "Run(12, \"assdf\", 112)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "j": "string <large string>"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "number 12",
+      "b": "string assdf"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "arg1": "number 12",
+      "arg2": "string assdf",
+      "arg3": "number 112"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "console": "Object {...}",
+      "F2": "function <large string>",
+      "F3": "function <large string>",
+      "F5": "function <large string>",
+      "F6": "function <large string>",
+      "F7": "function <large string>",
+      "Run": "function <large string>",
+      "obj4": "number 12.56"
+    }
+  },
+  {
+    "callStack": [
+      {
+        "line": 62,
+        "column": 12,
+        "sourceText": "a++",
+        "function": "f3"
+      },
+      {
+        "line": 71,
+        "column": 8,
+        "sourceText": "f3()",
+        "function": "f2"
+      },
+      {
+        "line": 74,
+        "column": 4,
+        "sourceText": "f2(k)",
+        "function": "F7"
+      },
+      {
+        "line": 80,
+        "column": 4,
+        "sourceText": "F7(arg3)",
+        "function": "Run"
+      },
+      {
+        "line": 83,
+        "column": 0,
+        "sourceText": "Run(12, \"assdf\", 112)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "c31": "undefined undefined",
+      "c32": "undefined undefined",
+      "a": "number 10"
+    },
+    "scopes0": "undefined undefined",
+    "scopes1": "undefined undefined"
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "f3": "function <large string>",
+      "f32": "function <large string>",
+      "arguments": "Object {...}",
+      "j2": "number 1",
+      "k2": "number 10",
+      "b21": "number 26.8",
+      "b22": "undefined undefined"
+    },
+    "scopes0": "undefined undefined"
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a1": "number 112",
+      "f2": "function <large string>",
+      "k": "number 26.8",
+      "m": "number 132",
+      "j": "number 10"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "arg1": "number 12",
+      "arg2": "string assdf",
+      "arg3": "number 112"
+    }
+  },
+  {
+    "callStack": [
+      {
+        "line": 13,
+        "column": 4,
+        "sourceText": "var sub = -10",
+        "function": "F2"
+      },
+      {
+        "line": 34,
+        "column": 12,
+        "sourceText": "return b1 + F2()",
+        "function": "f6"
+      },
+      {
+        "line": 36,
+        "column": 8,
+        "sourceText": "f6()",
+        "function": "F5_1"
+      },
+      {
+        "line": 38,
+        "column": 4,
+        "sourceText": "F5_1(t1)",
+        "function": "F5"
+      },
+      {
+        "line": 45,
+        "column": 8,
+        "sourceText": "F5()",
+        "function": "Anonymous function"
+      },
+      {
+        "line": 43,
+        "column": 5,
+        "sourceText": "function () {\r\n        var j = \"Anonymous function2\";\r\n        F5();\r\n        return j;                                    /**bp:stack();locals();setFrame(1);locals();setFrame(2);locals();setFrame(3);locals();**/\r\n    })()",
+        "function": "F6"
+      },
+      {
+        "line": 79,
+        "column": 4,
+        "sourceText": "F6(arg1, arg2)",
+        "function": "Run"
+      },
+      {
+        "line": 84,
+        "column": 0,
+        "sourceText": "Run([3,5,8], {a:\"aa\"}, 21)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "Array [...]",
+      "i": "number 100",
+      "sub": "undefined undefined"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "b1": "number 10",
+      "obj1": "Object {...}"
+    },
+    "scopes0": "undefined undefined",
+    "scopes1": "undefined undefined"
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "a": "number 22.2",
+      "arguments": "Object {...}",
+      "f6": "function <large string>",
+      "z": "number 20"
+    },
+    "scopes0": "undefined undefined"
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "F5_1": "function <large string>",
+      "x": "number 20",
+      "y": "Object {...}",
+      "t1": "number 22.2"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "j": "string <large string>"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "Array [3,5,8]",
+      "b": "Object {...}"
+    }
+  },
+  {
+    "callStack": [
+      {
+        "line": 46,
+        "column": 8,
+        "sourceText": "return j",
+        "function": "Anonymous function"
+      },
+      {
+        "line": 43,
+        "column": 5,
+        "sourceText": "function () {\r\n        var j = \"Anonymous function2\";\r\n        F5();\r\n        return j;                                    /**bp:stack();locals();setFrame(1);locals();setFrame(2);locals();setFrame(3);locals();**/\r\n    })()",
+        "function": "F6"
+      },
+      {
+        "line": 79,
+        "column": 4,
+        "sourceText": "F6(arg1, arg2)",
+        "function": "Run"
+      },
+      {
+        "line": 84,
+        "column": 0,
+        "sourceText": "Run([3,5,8], {a:\"aa\"}, 21)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "j": "string <large string>"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "Array [3,5,8]",
+      "b": "Object {...}"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "arg1": "Array [3,5,8]",
+      "arg2": "Object {...}",
+      "arg3": "number 21"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "console": "Object {...}",
+      "F2": "function <large string>",
+      "F3": "function <large string>",
+      "F5": "function <large string>",
+      "F6": "function <large string>",
+      "F7": "function <large string>",
+      "Run": "function <large string>",
+      "obj4": "number 12.56"
+    }
+  },
+  {
+    "callStack": [
+      {
+        "line": 62,
+        "column": 12,
+        "sourceText": "a++",
+        "function": "f3"
+      },
+      {
+        "line": 71,
+        "column": 8,
+        "sourceText": "f3()",
+        "function": "f2"
+      },
+      {
+        "line": 74,
+        "column": 4,
+        "sourceText": "f2(k)",
+        "function": "F7"
+      },
+      {
+        "line": 80,
+        "column": 4,
+        "sourceText": "F7(arg3)",
+        "function": "Run"
+      },
+      {
+        "line": 84,
+        "column": 0,
+        "sourceText": "Run([3,5,8], {a:\"aa\"}, 21)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "c31": "undefined undefined",
+      "c32": "undefined undefined",
+      "a": "number 10"
+    },
+    "scopes0": "undefined undefined",
+    "scopes1": "undefined undefined"
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "f3": "function <large string>",
+      "f32": "function <large string>",
+      "arguments": "Object {...}",
+      "j2": "number 1",
+      "k2": "number 10",
+      "b21": "number 26.8",
+      "b22": "undefined undefined"
+    },
+    "scopes0": "undefined undefined"
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a1": "number 21",
+      "f2": "function <large string>",
+      "k": "number 26.8",
+      "m": "number 41",
+      "j": "number 10"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "arg1": "Array [3,5,8]",
+      "arg2": "Object {...}",
+      "arg3": "number 21"
+    }
+  },
+  {
+    "callStack": [
+      {
+        "line": 13,
+        "column": 4,
+        "sourceText": "var sub = -10",
+        "function": "F2"
+      },
+      {
+        "line": 34,
+        "column": 12,
+        "sourceText": "return b1 + F2()",
+        "function": "f6"
+      },
+      {
+        "line": 36,
+        "column": 8,
+        "sourceText": "f6()",
+        "function": "F5_1"
+      },
+      {
+        "line": 38,
+        "column": 4,
+        "sourceText": "F5_1(t1)",
+        "function": "F5"
+      },
+      {
+        "line": 45,
+        "column": 8,
+        "sourceText": "F5()",
+        "function": "Anonymous function"
+      },
+      {
+        "line": 43,
+        "column": 5,
+        "sourceText": "function () {\r\n        var j = \"Anonymous function2\";\r\n        F5();\r\n        return j;                                    /**bp:stack();locals();setFrame(1);locals();setFrame(2);locals();setFrame(3);locals();**/\r\n    })()",
+        "function": "F6"
+      },
+      {
+        "line": 79,
+        "column": 4,
+        "sourceText": "F6(arg1, arg2)",
+        "function": "Run"
+      },
+      {
+        "line": 85,
+        "column": 0,
+        "sourceText": "Run(12, \"assdf\", 112)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "Array [...]",
+      "i": "number 100",
+      "sub": "undefined undefined"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "b1": "number 10",
+      "obj1": "Object {...}"
+    },
+    "scopes0": "undefined undefined",
+    "scopes1": "undefined undefined"
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "a": "number 22.2",
+      "arguments": "Object {...}",
+      "f6": "function <large string>",
+      "z": "number 20"
+    },
+    "scopes0": "undefined undefined"
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "F5_1": "function <large string>",
+      "x": "number 20",
+      "y": "Object {...}",
+      "t1": "number 22.2"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "j": "string <large string>"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "number 12",
+      "b": "string assdf"
+    }
+  },
+  {
+    "callStack": [
+      {
+        "line": 46,
+        "column": 8,
+        "sourceText": "return j",
+        "function": "Anonymous function"
+      },
+      {
+        "line": 43,
+        "column": 5,
+        "sourceText": "function () {\r\n        var j = \"Anonymous function2\";\r\n        F5();\r\n        return j;                                    /**bp:stack();locals();setFrame(1);locals();setFrame(2);locals();setFrame(3);locals();**/\r\n    })()",
+        "function": "F6"
+      },
+      {
+        "line": 79,
+        "column": 4,
+        "sourceText": "F6(arg1, arg2)",
+        "function": "Run"
+      },
+      {
+        "line": 85,
+        "column": 0,
+        "sourceText": "Run(12, \"assdf\", 112)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "j": "string <large string>"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "number 12",
+      "b": "string assdf"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "arg1": "number 12",
+      "arg2": "string assdf",
+      "arg3": "number 112"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "console": "Object {...}",
+      "F2": "function <large string>",
+      "F3": "function <large string>",
+      "F5": "function <large string>",
+      "F6": "function <large string>",
+      "F7": "function <large string>",
+      "Run": "function <large string>",
+      "obj4": "number 12.56"
+    }
+  },
+  {
+    "callStack": [
+      {
+        "line": 62,
+        "column": 12,
+        "sourceText": "a++",
+        "function": "f3"
+      },
+      {
+        "line": 71,
+        "column": 8,
+        "sourceText": "f3()",
+        "function": "f2"
+      },
+      {
+        "line": 74,
+        "column": 4,
+        "sourceText": "f2(k)",
+        "function": "F7"
+      },
+      {
+        "line": 80,
+        "column": 4,
+        "sourceText": "F7(arg3)",
+        "function": "Run"
+      },
+      {
+        "line": 85,
+        "column": 0,
+        "sourceText": "Run(12, \"assdf\", 112)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "c31": "undefined undefined",
+      "c32": "undefined undefined",
+      "a": "number 10"
+    },
+    "scopes0": "undefined undefined",
+    "scopes1": "undefined undefined"
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "f3": "function <large string>",
+      "f32": "function <large string>",
+      "arguments": "Object {...}",
+      "j2": "number 1",
+      "k2": "number 10",
+      "b21": "number 26.8",
+      "b22": "undefined undefined"
+    },
+    "scopes0": "undefined undefined"
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a1": "number 112",
+      "f2": "function <large string>",
+      "k": "number 26.8",
+      "m": "number 132",
+      "j": "number 10"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "arg1": "number 12",
+      "arg2": "string assdf",
+      "arg3": "number 112"
+    }
+  },
+  {
+    "callStack": [
+      {
+        "line": 13,
+        "column": 4,
+        "sourceText": "var sub = -10",
+        "function": "F2"
+      },
+      {
+        "line": 34,
+        "column": 12,
+        "sourceText": "return b1 + F2()",
+        "function": "f6"
+      },
+      {
+        "line": 36,
+        "column": 8,
+        "sourceText": "f6()",
+        "function": "F5_1"
+      },
+      {
+        "line": 38,
+        "column": 4,
+        "sourceText": "F5_1(t1)",
+        "function": "F5"
+      },
+      {
+        "line": 45,
+        "column": 8,
+        "sourceText": "F5()",
+        "function": "Anonymous function"
+      },
+      {
+        "line": 43,
+        "column": 5,
+        "sourceText": "function () {\r\n        var j = \"Anonymous function2\";\r\n        F5();\r\n        return j;                                    /**bp:stack();locals();setFrame(1);locals();setFrame(2);locals();setFrame(3);locals();**/\r\n    })()",
+        "function": "F6"
+      },
+      {
+        "line": 79,
+        "column": 4,
+        "sourceText": "F6(arg1, arg2)",
+        "function": "Run"
+      },
+      {
+        "line": 86,
+        "column": 0,
+        "sourceText": "Run([3,5,8], {a:\"aa\"}, 21)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "Array [...]",
+      "i": "number 100",
+      "sub": "undefined undefined"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "b1": "number 10",
+      "obj1": "Object {...}"
+    },
+    "scopes0": "undefined undefined",
+    "scopes1": "undefined undefined"
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "a": "number 22.2",
+      "arguments": "Object {...}",
+      "f6": "function <large string>",
+      "z": "number 20"
+    },
+    "scopes0": "undefined undefined"
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "F5_1": "function <large string>",
+      "x": "number 20",
+      "y": "Object {...}",
+      "t1": "number 22.2"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "j": "string <large string>"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "Array [3,5,8]",
+      "b": "Object {...}"
+    }
+  },
+  {
+    "callStack": [
+      {
+        "line": 46,
+        "column": 8,
+        "sourceText": "return j",
+        "function": "Anonymous function"
+      },
+      {
+        "line": 43,
+        "column": 5,
+        "sourceText": "function () {\r\n        var j = \"Anonymous function2\";\r\n        F5();\r\n        return j;                                    /**bp:stack();locals();setFrame(1);locals();setFrame(2);locals();setFrame(3);locals();**/\r\n    })()",
+        "function": "F6"
+      },
+      {
+        "line": 79,
+        "column": 4,
+        "sourceText": "F6(arg1, arg2)",
+        "function": "Run"
+      },
+      {
+        "line": 86,
+        "column": 0,
+        "sourceText": "Run([3,5,8], {a:\"aa\"}, 21)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "j": "string <large string>"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "Array [3,5,8]",
+      "b": "Object {...}"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "arg1": "Array [3,5,8]",
+      "arg2": "Object {...}",
+      "arg3": "number 21"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "console": "Object {...}",
+      "F2": "function <large string>",
+      "F3": "function <large string>",
+      "F5": "function <large string>",
+      "F6": "function <large string>",
+      "F7": "function <large string>",
+      "Run": "function <large string>",
+      "obj4": "number 12.56"
+    }
+  },
+  {
+    "callStack": [
+      {
+        "line": 62,
+        "column": 12,
+        "sourceText": "a++",
+        "function": "f3"
+      },
+      {
+        "line": 71,
+        "column": 8,
+        "sourceText": "f3()",
+        "function": "f2"
+      },
+      {
+        "line": 74,
+        "column": 4,
+        "sourceText": "f2(k)",
+        "function": "F7"
+      },
+      {
+        "line": 80,
+        "column": 4,
+        "sourceText": "F7(arg3)",
+        "function": "Run"
+      },
+      {
+        "line": 86,
+        "column": 0,
+        "sourceText": "Run([3,5,8], {a:\"aa\"}, 21)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "c31": "undefined undefined",
+      "c32": "undefined undefined",
+      "a": "number 10"
+    },
+    "scopes0": "undefined undefined",
+    "scopes1": "undefined undefined"
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "f3": "function <large string>",
+      "f32": "function <large string>",
+      "arguments": "Object {...}",
+      "j2": "number 1",
+      "k2": "number 10",
+      "b21": "number 26.8",
+      "b22": "undefined undefined"
+    },
+    "scopes0": "undefined undefined"
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a1": "number 21",
+      "f2": "function <large string>",
+      "k": "number 26.8",
+      "m": "number 41",
+      "j": "number 10"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "arg1": "Array [3,5,8]",
+      "arg2": "Object {...}",
+      "arg3": "number 21"
+    }
+  }
+]

+ 56 - 0
test/DebuggerCommon/ObjLit_step_into_more.js

@@ -0,0 +1,56 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+var a1 = 10;
+
+var globObj = {
+    ga: a1,
+    gb: foo() /**bp:  logJson('globObj'); stack(); resume('step_over');
+                logJson('GlstepOver1'); stack();
+                **/
+}
+
+
+function foo() {
+    return a1 * 5;
+}
+
+function bar() {
+    a1 += 11;
+    return a1;
+}
+
+function sub_expression_step_into_more() {
+    a1; /**bp:  logJson('start'); stack(); resume('step_over'); 
+                logJson('stepOver1_at_obj_lit'); stack(); resume('step_into'); resume('step_into');
+                logJson('stepIn1_inside_eval'); stack(); resume('step_into');resume('step_into');
+                logJson('stepIn3_inside_foo'); stack(); resume('step_into');resume('step_into');resume('step_into');
+                logJson('stepIn6_next_subexp'); stack(); resume('step_into');resume('step_into');
+                logJson('stepIn8_inside_bar'); stack(); resume('step_into');resume('step_into');resume('step_into');
+                logJson('stepIn11_back_in_objLit'); stack();
+        **/
+    var obj = { 
+        a: a1,  
+        b: a1++, 
+        func : function(a, b) {
+            return 5;
+        },
+        globObj,
+        ev: eval('a1 + a1*2'),
+        c:  {
+                ca: a1 * 2, 
+                cb: foo(),
+                cc: a1,
+                cd: bar(),
+                c3: a1 * 3
+            },
+        d: foo()    /**bp:  logJson('BP1'); stack(); resume('step_into');
+                            logJson('BP1stepIn1_inside_foo'); stack();
+                    **/
+        };
+    WScript.Echo(JSON.stringify(obj));
+}
+
+sub_expression_step_into_more();

+ 1 - 0
test/DebuggerCommon/ObjLit_step_into_more.js.baseline

@@ -0,0 +1 @@
+{"a":10,"b":10,"globObj":{"ga":10,"gb":50},"ev":33,"c":{"ca":22,"cb":55,"cc":11,"cd":22,"c3":66},"d":110}

+ 217 - 0
test/DebuggerCommon/ObjLit_step_into_more.js.dbg.baseline

@@ -0,0 +1,217 @@
+[
+  {
+    "log": "globObj"
+  },
+  {
+    "callStack": [
+      {
+        "line": 9,
+        "column": 4,
+        "sourceText": "gb: foo()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "log": "GlstepOver1"
+  },
+  {
+    "callStack": [
+      {
+        "line": 55,
+        "column": 0,
+        "sourceText": "sub_expression_step_into_more()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "log": "start"
+  },
+  {
+    "callStack": [
+      {
+        "line": 25,
+        "column": 4,
+        "sourceText": "a1",
+        "function": "sub_expression_step_into_more"
+      },
+      {
+        "line": 55,
+        "column": 0,
+        "sourceText": "sub_expression_step_into_more()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "log": "stepOver1_at_obj_lit"
+  },
+  {
+    "callStack": [
+      {
+        "line": 33,
+        "column": 4,
+        "sourceText": "var obj = { \r\n        a: a1,  \r\n        b: a1++, \r\n        func : function(a, b) {\r\n            return 5;\r\n        },\r\n        globObj,\r\n        ev: eval('a1 + a1*2'),\r\n        c:  {\r\n                ca: a1 * 2, \r\n                cb: foo(),\r\n                cc: a1,\r\n                cd: bar(),\r\n                c3: a1 * 3\r\n            },\r\n        d: foo()    /**bp:  logJson('BP1'); stack(); resume('step_into');\r\n                            logJson('BP1stepIn1_inside_foo'); stack();\r\n                    **/\r\n        }",
+        "function": "sub_expression_step_into_more"
+      },
+      {
+        "line": 55,
+        "column": 0,
+        "sourceText": "sub_expression_step_into_more()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "log": "stepIn1_inside_eval"
+  },
+  {
+    "callStack": [
+      {
+        "line": 40,
+        "column": 8,
+        "sourceText": "ev: eval('a1 + a1*2')",
+        "function": "sub_expression_step_into_more"
+      },
+      {
+        "line": 55,
+        "column": 0,
+        "sourceText": "sub_expression_step_into_more()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "log": "stepIn3_inside_foo"
+  },
+  {
+    "callStack": [
+      {
+        "line": 16,
+        "column": 4,
+        "sourceText": "return a1 * 5",
+        "function": "foo"
+      },
+      {
+        "line": 43,
+        "column": 16,
+        "sourceText": "cb: foo()",
+        "function": "sub_expression_step_into_more"
+      },
+      {
+        "line": 55,
+        "column": 0,
+        "sourceText": "sub_expression_step_into_more()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "log": "stepIn6_next_subexp"
+  },
+  {
+    "callStack": [
+      {
+        "line": 44,
+        "column": 16,
+        "sourceText": "cc: a1",
+        "function": "sub_expression_step_into_more"
+      },
+      {
+        "line": 55,
+        "column": 0,
+        "sourceText": "sub_expression_step_into_more()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "log": "stepIn8_inside_bar"
+  },
+  {
+    "callStack": [
+      {
+        "line": 20,
+        "column": 4,
+        "sourceText": "a1 += 11",
+        "function": "bar"
+      },
+      {
+        "line": 45,
+        "column": 16,
+        "sourceText": "cd: bar()",
+        "function": "sub_expression_step_into_more"
+      },
+      {
+        "line": 55,
+        "column": 0,
+        "sourceText": "sub_expression_step_into_more()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "log": "stepIn11_back_in_objLit"
+  },
+  {
+    "callStack": [
+      {
+        "line": 45,
+        "column": 16,
+        "sourceText": "cd: bar()",
+        "function": "sub_expression_step_into_more"
+      },
+      {
+        "line": 55,
+        "column": 0,
+        "sourceText": "sub_expression_step_into_more()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "log": "BP1"
+  },
+  {
+    "callStack": [
+      {
+        "line": 48,
+        "column": 8,
+        "sourceText": "d: foo()",
+        "function": "sub_expression_step_into_more"
+      },
+      {
+        "line": 55,
+        "column": 0,
+        "sourceText": "sub_expression_step_into_more()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "log": "BP1stepIn1_inside_foo"
+  },
+  {
+    "callStack": [
+      {
+        "line": 16,
+        "column": 4,
+        "sourceText": "return a1 * 5",
+        "function": "foo"
+      },
+      {
+        "line": 48,
+        "column": 8,
+        "sourceText": "d: foo()",
+        "function": "sub_expression_step_into_more"
+      },
+      {
+        "line": 55,
+        "column": 0,
+        "sourceText": "sub_expression_step_into_more()",
+        "function": "Global code"
+      }
+    ]
+  }
+]

+ 31 - 0
test/DebuggerCommon/ObjLit_step_into_out.js

@@ -0,0 +1,31 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+var a1 = 10;
+
+function foo() {
+    return a1 * 5;
+}
+
+function sub_expression_step_into() {
+    a1; /**bp:  logJson('start'); stack(); resume('step_over'); 
+                logJson('stepOver1_at_obj_lit'); stack(); resume('step_into');
+                logJson('stepIn1_inside_foo'); stack(); resume('step_out');
+                logJson('stepOut1_back_in_caller'); stack(); resume('step_over'); 
+                logJson('stepOver2_next_statement'); stack(); locals(1);
+        **/
+    var obj = { 
+        a: a1,  
+        b: a1 + 20, 
+        c:  {
+                ca: a1 * 2, 
+                cb: foo(),
+                cc: a1
+            }
+        };
+    WScript.Echo(JSON.stringify(obj)); /**bp:  logJson('BP1'); stack(); locals(); **/
+}
+
+sub_expression_step_into();

+ 1 - 0
test/DebuggerCommon/ObjLit_step_into_out.js.baseline

@@ -0,0 +1 @@
+{"a":10,"b":30,"c":{"ca":20,"cb":50,"cc":10}}

+ 134 - 0
test/DebuggerCommon/ObjLit_step_into_out.js.dbg.baseline

@@ -0,0 +1,134 @@
+[
+  {
+    "log": "start"
+  },
+  {
+    "callStack": [
+      {
+        "line": 12,
+        "column": 4,
+        "sourceText": "a1",
+        "function": "sub_expression_step_into"
+      },
+      {
+        "line": 30,
+        "column": 0,
+        "sourceText": "sub_expression_step_into()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "log": "stepOver1_at_obj_lit"
+  },
+  {
+    "callStack": [
+      {
+        "line": 18,
+        "column": 4,
+        "sourceText": "var obj = { \r\n        a: a1,  \r\n        b: a1 + 20, \r\n        c:  {\r\n                ca: a1 * 2, \r\n                cb: foo(),\r\n                cc: a1\r\n            }\r\n        }",
+        "function": "sub_expression_step_into"
+      },
+      {
+        "line": 30,
+        "column": 0,
+        "sourceText": "sub_expression_step_into()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "log": "stepIn1_inside_foo"
+  },
+  {
+    "callStack": [
+      {
+        "line": 8,
+        "column": 4,
+        "sourceText": "return a1 * 5",
+        "function": "foo"
+      },
+      {
+        "line": 23,
+        "column": 16,
+        "sourceText": "cb: foo()",
+        "function": "sub_expression_step_into"
+      },
+      {
+        "line": 30,
+        "column": 0,
+        "sourceText": "sub_expression_step_into()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "log": "stepOut1_back_in_caller"
+  },
+  {
+    "callStack": [
+      {
+        "line": 23,
+        "column": 16,
+        "sourceText": "cb: foo()",
+        "function": "sub_expression_step_into"
+      },
+      {
+        "line": 30,
+        "column": 0,
+        "sourceText": "sub_expression_step_into()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "log": "stepOver2_next_statement"
+  },
+  {
+    "callStack": [
+      {
+        "line": 27,
+        "column": 4,
+        "sourceText": "WScript.Echo(JSON.stringify(obj))",
+        "function": "sub_expression_step_into"
+      },
+      {
+        "line": 30,
+        "column": 0,
+        "sourceText": "sub_expression_step_into()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "foo": "function <large string>",
+      "sub_expression_step_into": "function <large string>",
+      "a1": "number 10"
+    },
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 0",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>"
+    },
+    "locals": {
+      "obj": {
+        "#__proto__": "Object {...}",
+        "a": "number 10",
+        "b": "number 30",
+        "c": "Object {...}"
+      }
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "foo": "function <large string>",
+      "sub_expression_step_into": "function <large string>",
+      "a1": "number 10"
+    }
+  }
+]

+ 29 - 0
test/DebuggerCommon/ObjLit_step_over.js

@@ -0,0 +1,29 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+var a1 = 10;
+
+function foo() {
+    return a1 * 5;
+}
+
+function sub_expression_step_over() {
+    a1; /**bp:  logJson('start'); stack(); resume('step_over'); 
+                logJson('stepOver1_at_obj_lit'); stack(); resume('step_over');
+                logJson('stepOver2_next_statement'); stack(); locals(1);
+        **/
+    var obj = { 
+        a: a1,  
+        b: a1 + 20, 
+        c:  {
+                ca: a1 * 2, 
+                cb: foo(),
+                cc: a1
+            }
+        };
+    WScript.Echo(JSON.stringify(obj)); /**bp:  logJson('BP1'); stack(); locals(); **/
+}
+
+sub_expression_step_over();

+ 1 - 0
test/DebuggerCommon/ObjLit_step_over.js.baseline

@@ -0,0 +1 @@
+{"a":10,"b":30,"c":{"ca":20,"cb":50,"cc":10}}

+ 93 - 0
test/DebuggerCommon/ObjLit_step_over.js.dbg.baseline

@@ -0,0 +1,93 @@
+[
+  {
+    "log": "start"
+  },
+  {
+    "callStack": [
+      {
+        "line": 12,
+        "column": 4,
+        "sourceText": "a1",
+        "function": "sub_expression_step_over"
+      },
+      {
+        "line": 28,
+        "column": 0,
+        "sourceText": "sub_expression_step_over()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "log": "stepOver1_at_obj_lit"
+  },
+  {
+    "callStack": [
+      {
+        "line": 16,
+        "column": 4,
+        "sourceText": "var obj = { \r\n        a: a1,  \r\n        b: a1 + 20, \r\n        c:  {\r\n                ca: a1 * 2, \r\n                cb: foo(),\r\n                cc: a1\r\n            }\r\n        }",
+        "function": "sub_expression_step_over"
+      },
+      {
+        "line": 28,
+        "column": 0,
+        "sourceText": "sub_expression_step_over()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "log": "stepOver2_next_statement"
+  },
+  {
+    "callStack": [
+      {
+        "line": 25,
+        "column": 4,
+        "sourceText": "WScript.Echo(JSON.stringify(obj))",
+        "function": "sub_expression_step_over"
+      },
+      {
+        "line": 28,
+        "column": 0,
+        "sourceText": "sub_expression_step_over()",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "foo": "function <large string>",
+      "sub_expression_step_over": "function <large string>",
+      "a1": "number 10"
+    },
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 0",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>"
+    },
+    "functionCallsReturn": {
+      "[foo returned]": "number 50"
+    },
+    "locals": {
+      "obj": {
+        "#__proto__": "Object {...}",
+        "a": "number 10",
+        "b": "number 30",
+        "c": "Object {...}"
+      }
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "foo": "function <large string>",
+      "sub_expression_step_over": "function <large string>",
+      "a1": "number 10"
+    }
+  }
+]

+ 29 - 0
test/DebuggerCommon/TypedArray.js

@@ -0,0 +1,29 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Sanity check that typed array constructor and object show up correctly in the debugger
+Int8Array; /**bp:evaluate("Int8Array", 3)**/
+var ta = new Int8Array([1]);
+ta; /**bp:evaluate("ta", 3)**/
+
+// Verify that all the TypedArray APIs that have callbacks show up on the call stack
+function callback() {
+    return; /**bp:stack()**/
+}
+
+ta2 = new Int8Array([1,2]);
+
+ta.every(callback);
+ta.filter(callback);
+ta.find(callback);
+ta.findIndex(callback);
+ta.forEach(callback);
+ta.map(callback);
+ta2.reduce(callback);
+ta2.reduceRight(callback);
+ta.some(callback);
+ta2.sort(callback);
+
+WScript.Echo("PASS");

+ 350 - 0
test/DebuggerCommon/TypedArray.js.dbg.baseline

@@ -0,0 +1,350 @@
+[
+  {
+    "evaluate": {
+      "Int8Array": {
+        "#__proto__": {
+          "#__proto__": {
+            "#__proto__": "Object {...}",
+            "constructor": "function function Function() { [native code] }",
+            "length": "number 0",
+            "name": "string ",
+            "apply": "function function apply() { [native code] }",
+            "bind": "function function bind() { [native code] }",
+            "call": "function function call() { [native code] }",
+            "toString": "function function toString() { [native code] }",
+            "caller": "Error 'arguments', 'callee' and 'caller' are restricted function properties and cannot be accessed in this context",
+            "arguments": "Error 'arguments', 'callee' and 'caller' are restricted function properties and cannot be accessed in this context"
+          },
+          "length": "number 3",
+          "name": "string TypedArray",
+          "prototype": {
+            "#__proto__": "Object {...}",
+            "constructor": "function function() {\n    [native code]\n}",
+            "set": "function function set() { [native code] }",
+            "subarray": "function function subarray() { [native code] }",
+            "copyWithin": "function function copyWithin() { [native code] }",
+            "every": "function function every() { [native code] }",
+            "fill": "function function fill() { [native code] }",
+            "filter": "function function filter() { [native code] }",
+            "find": "function function find() { [native code] }",
+            "findIndex": "function function findIndex() { [native code] }",
+            "forEach": "function function forEach() { [native code] }",
+            "indexOf": "function function indexOf() { [native code] }",
+            "join": "function function join() { [native code] }",
+            "lastIndexOf": "function function lastIndexOf() { [native code] }",
+            "map": "function function map() { [native code] }",
+            "reduce": "function function reduce() { [native code] }",
+            "reduceRight": "function function reduceRight() { [native code] }",
+            "reverse": "function function reverse() { [native code] }",
+            "slice": "function function slice() { [native code] }",
+            "some": "function function some() { [native code] }",
+            "sort": "function function sort() { [native code] }",
+            "entries": "function function entries() { [native code] }",
+            "keys": "function function keys() { [native code] }",
+            "values": "function function values() { [native code] }",
+            "Symbol.iterator": "function function values() { [native code] }",
+            "includes": "function function includes() { [native code] }",
+            "buffer": "Error 'this' is not a typed array object",
+            "byteLength": "Error 'this' is not a typed array object",
+            "byteOffset": "Error 'this' is not a typed array object",
+            "length": "Error 'this' is not a typed array object",
+            "Symbol.toStringTag": "undefined undefined",
+            "toLocaleString": "function function toLocaleString() { [native code] }",
+            "toString": "function function toString() { [native code] }"
+          },
+          "from": {
+            "#__proto__": "function function() {\n    [native code]\n}",
+            "length": "number 1",
+            "name": "string from",
+            "caller": "object null",
+            "arguments": "object null"
+          },
+          "of": {
+            "#__proto__": "function function() {\n    [native code]\n}",
+            "length": "number 0",
+            "name": "string of",
+            "caller": "object null",
+            "arguments": "object null"
+          },
+          "[Symbol.species]": {
+            "#__proto__": "function function() {\n    [native code]\n}",
+            "length": "number 3",
+            "name": "string Int8Array",
+            "BYTES_PER_ELEMENT": "number 1",
+            "prototype": "Object {...}",
+            "caller": "object null",
+            "arguments": "object null"
+          },
+          "caller": "object null",
+          "arguments": "object null"
+        },
+        "length": "number 3",
+        "name": "string Int8Array",
+        "BYTES_PER_ELEMENT": "number 1",
+        "prototype": {
+          "#__proto__": {
+            "#__proto__": "Object {...}",
+            "constructor": "function function() {\n    [native code]\n}",
+            "set": "function function set() { [native code] }",
+            "subarray": "function function subarray() { [native code] }",
+            "copyWithin": "function function copyWithin() { [native code] }",
+            "every": "function function every() { [native code] }",
+            "fill": "function function fill() { [native code] }",
+            "filter": "function function filter() { [native code] }",
+            "find": "function function find() { [native code] }",
+            "findIndex": "function function findIndex() { [native code] }",
+            "forEach": "function function forEach() { [native code] }",
+            "indexOf": "function function indexOf() { [native code] }",
+            "join": "function function join() { [native code] }",
+            "lastIndexOf": "function function lastIndexOf() { [native code] }",
+            "map": "function function map() { [native code] }",
+            "reduce": "function function reduce() { [native code] }",
+            "reduceRight": "function function reduceRight() { [native code] }",
+            "reverse": "function function reverse() { [native code] }",
+            "slice": "function function slice() { [native code] }",
+            "some": "function function some() { [native code] }",
+            "sort": "function function sort() { [native code] }",
+            "entries": "function function entries() { [native code] }",
+            "keys": "function function keys() { [native code] }",
+            "values": "function function values() { [native code] }",
+            "Symbol.iterator": "function function values() { [native code] }",
+            "includes": "function function includes() { [native code] }",
+            "buffer": "Error 'this' is not a typed array object",
+            "byteLength": "Error 'this' is not a typed array object",
+            "byteOffset": "Error 'this' is not a typed array object",
+            "length": "Error 'this' is not a typed array object",
+            "Symbol.toStringTag": "undefined undefined",
+            "toLocaleString": "function function toLocaleString() { [native code] }",
+            "toString": "function function toString() { [native code] }"
+          },
+          "constructor": {
+            "#__proto__": "function function() {\n    [native code]\n}",
+            "length": "number 3",
+            "name": "string Int8Array",
+            "BYTES_PER_ELEMENT": "number 1",
+            "prototype": "Object {...}",
+            "caller": "object null",
+            "arguments": "object null"
+          },
+          "BYTES_PER_ELEMENT": "number 1"
+        },
+        "caller": "object null",
+        "arguments": "object null"
+      }
+    }
+  },
+  {
+    "evaluate": {
+      "ta": {
+        "#__proto__": {
+          "#__proto__": {
+            "#__proto__": "Object {...}",
+            "constructor": "function function() {\n    [native code]\n}",
+            "set": "function function set() { [native code] }",
+            "subarray": "function function subarray() { [native code] }",
+            "copyWithin": "function function copyWithin() { [native code] }",
+            "every": "function function every() { [native code] }",
+            "fill": "function function fill() { [native code] }",
+            "filter": "function function filter() { [native code] }",
+            "find": "function function find() { [native code] }",
+            "findIndex": "function function findIndex() { [native code] }",
+            "forEach": "function function forEach() { [native code] }",
+            "indexOf": "function function indexOf() { [native code] }",
+            "join": "function function join() { [native code] }",
+            "lastIndexOf": "function function lastIndexOf() { [native code] }",
+            "map": "function function map() { [native code] }",
+            "reduce": "function function reduce() { [native code] }",
+            "reduceRight": "function function reduceRight() { [native code] }",
+            "reverse": "function function reverse() { [native code] }",
+            "slice": "function function slice() { [native code] }",
+            "some": "function function some() { [native code] }",
+            "sort": "function function sort() { [native code] }",
+            "entries": "function function entries() { [native code] }",
+            "keys": "function function keys() { [native code] }",
+            "values": "function function values() { [native code] }",
+            "Symbol.iterator": "function function values() { [native code] }",
+            "includes": "function function includes() { [native code] }",
+            "buffer": "ArrayBuffer [object ArrayBuffer]",
+            "byteLength": "number 1",
+            "byteOffset": "number 0",
+            "length": "number 1",
+            "Symbol.toStringTag": "string Int8Array",
+            "toLocaleString": "function function toLocaleString() { [native code] }",
+            "toString": "function function toString() { [native code] }"
+          },
+          "constructor": {
+            "#__proto__": "function function() {\n    [native code]\n}",
+            "length": "number 3",
+            "name": "string Int8Array",
+            "BYTES_PER_ELEMENT": "number 1",
+            "prototype": "Object {...}",
+            "caller": "object null",
+            "arguments": "object null"
+          },
+          "BYTES_PER_ELEMENT": "number 1"
+        },
+        "[0]": "string 1"
+      }
+    }
+  },
+  {
+    "callStack": [
+      {
+        "line": 12,
+        "column": 4,
+        "sourceText": "return",
+        "function": "callback"
+      },
+      {
+        "line": 17,
+        "column": 0,
+        "sourceText": "ta.every(callback)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 12,
+        "column": 4,
+        "sourceText": "return",
+        "function": "callback"
+      },
+      {
+        "line": 18,
+        "column": 0,
+        "sourceText": "ta.filter(callback)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 12,
+        "column": 4,
+        "sourceText": "return",
+        "function": "callback"
+      },
+      {
+        "line": 19,
+        "column": 0,
+        "sourceText": "ta.find(callback)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 12,
+        "column": 4,
+        "sourceText": "return",
+        "function": "callback"
+      },
+      {
+        "line": 20,
+        "column": 0,
+        "sourceText": "ta.findIndex(callback)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 12,
+        "column": 4,
+        "sourceText": "return",
+        "function": "callback"
+      },
+      {
+        "line": 21,
+        "column": 0,
+        "sourceText": "ta.forEach(callback)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 12,
+        "column": 4,
+        "sourceText": "return",
+        "function": "callback"
+      },
+      {
+        "line": 22,
+        "column": 0,
+        "sourceText": "ta.map(callback)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 12,
+        "column": 4,
+        "sourceText": "return",
+        "function": "callback"
+      },
+      {
+        "line": 23,
+        "column": 0,
+        "sourceText": "ta2.reduce(callback)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 12,
+        "column": 4,
+        "sourceText": "return",
+        "function": "callback"
+      },
+      {
+        "line": 24,
+        "column": 0,
+        "sourceText": "ta2.reduceRight(callback)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 12,
+        "column": 4,
+        "sourceText": "return",
+        "function": "callback"
+      },
+      {
+        "line": 25,
+        "column": 0,
+        "sourceText": "ta.some(callback)",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "callStack": [
+      {
+        "line": 12,
+        "column": 4,
+        "sourceText": "return",
+        "function": "callback"
+      },
+      {
+        "line": 26,
+        "column": 0,
+        "sourceText": "ta2.sort(callback)",
+        "function": "Global code"
+      }
+    ]
+  }
+]

+ 676 - 0
test/DebuggerCommon/array_protoTest.js.dbg.baseline

@@ -0,0 +1,676 @@
+[
+  {
+    "this": {
+      "telemetryLog": {
+        "#__proto__": "function <large string>",
+        "length": "number 3",
+        "name": "string telemetryLog",
+        "caller": "object null",
+        "arguments": "object null"
+      },
+      "console": {
+        "#__proto__": "Object {...}",
+        "log": "function log"
+      },
+      "foo": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string foo",
+        "caller": "object null",
+        "arguments": "Object {...}",
+        "length": "number 0"
+      },
+      "foo1": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string foo1",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 0"
+      },
+      "foo2": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string foo2",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 0"
+      }
+    },
+    "arguments": {
+      "#__proto__": {
+        "constructor": "function <large string>",
+        "hasOwnProperty": "function <large string>",
+        "propertyIsEnumerable": "function <large string>",
+        "isPrototypeOf": "function <large string>",
+        "toLocaleString": "function <large string>",
+        "toString": "function <large string>",
+        "valueOf": "function <large string>",
+        "#__proto__": "object null",
+        "__defineGetter__": "function <large string>",
+        "__defineSetter__": "function <large string>",
+        "__lookupGetter__": "function <large string>",
+        "__lookupSetter__": "function <large string>"
+      },
+      "length": "number 0",
+      "callee": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string foo",
+        "caller": "object null",
+        "arguments": "Object {...}",
+        "length": "number 0"
+      },
+      "Symbol.iterator": {
+        "#__proto__": "function <large string>",
+        "length": "number 0",
+        "name": "string values",
+        "caller": "object null",
+        "arguments": "object null"
+      }
+    },
+    "locals": {
+      "j1": {
+        "#__proto__": {
+          "#__proto__": "Object {...}",
+          "constructor": "function <large string>",
+          "push": "function <large string>",
+          "concat": "function <large string>",
+          "join": "function <large string>",
+          "pop": "function <large string>",
+          "reverse": "function <large string>",
+          "shift": "function <large string>",
+          "slice": "function <large string>",
+          "sort": "function <large string>",
+          "splice": "function <large string>",
+          "toLocaleString": "function <large string>",
+          "toString": "function <large string>",
+          "unshift": "function <large string>",
+          "indexOf": "function <large string>",
+          "every": "function <large string>",
+          "filter": "function <large string>",
+          "forEach": "function <large string>",
+          "lastIndexOf": "function <large string>",
+          "map": "function <large string>",
+          "reduce": "function <large string>",
+          "reduceRight": "function <large string>",
+          "some": "function <large string>",
+          "find": "function <large string>",
+          "findIndex": "function <large string>",
+          "entries": "function <large string>",
+          "keys": "function <large string>",
+          "values": "function <large string>",
+          "Symbol.iterator": "function <large string>",
+          "Symbol.unscopables": "Object {...}",
+          "fill": "function <large string>",
+          "copyWithin": "function <large string>",
+          "includes": "function <large string>",
+          "length": "number 25",
+          "[24]": "string 22"
+        },
+        "length": "number 1000000001",
+        "[1000000000]": "string 20"
+      },
+      "m1": {
+        "#__proto__": {
+          "#__proto__": "Object {...}",
+          "constructor": "function <large string>",
+          "push": "function <large string>",
+          "concat": "function <large string>",
+          "join": "function <large string>",
+          "pop": "function <large string>",
+          "reverse": "function <large string>",
+          "shift": "function <large string>",
+          "slice": "function <large string>",
+          "sort": "function <large string>",
+          "splice": "function <large string>",
+          "toLocaleString": "function <large string>",
+          "toString": "function <large string>",
+          "unshift": "function <large string>",
+          "indexOf": "function <large string>",
+          "every": "function <large string>",
+          "filter": "function <large string>",
+          "forEach": "function <large string>",
+          "lastIndexOf": "function <large string>",
+          "map": "function <large string>",
+          "reduce": "function <large string>",
+          "reduceRight": "function <large string>",
+          "some": "function <large string>",
+          "find": "function <large string>",
+          "findIndex": "function <large string>",
+          "entries": "function <large string>",
+          "keys": "function <large string>",
+          "values": "function <large string>",
+          "Symbol.iterator": "function <large string>",
+          "Symbol.unscopables": "Object {...}",
+          "fill": "function <large string>",
+          "copyWithin": "function <large string>",
+          "includes": "function <large string>",
+          "length": "number 25",
+          "[24]": "string 22"
+        },
+        "length": "number 2",
+        "[0]": "string 2",
+        "[1]": "string 34"
+      },
+      "j2": {
+        "#__proto__": {
+          "#__proto__": "Object {...}",
+          "constructor": "function <large string>",
+          "push": "function <large string>",
+          "concat": "function <large string>",
+          "join": "function <large string>",
+          "pop": "function <large string>",
+          "reverse": "function <large string>",
+          "shift": "function <large string>",
+          "slice": "function <large string>",
+          "sort": "function <large string>",
+          "splice": "function <large string>",
+          "toLocaleString": "function <large string>",
+          "toString": "function <large string>",
+          "unshift": "function <large string>",
+          "indexOf": "function <large string>",
+          "every": "function <large string>",
+          "filter": "function <large string>",
+          "forEach": "function <large string>",
+          "lastIndexOf": "function <large string>",
+          "map": "function <large string>",
+          "reduce": "function <large string>",
+          "reduceRight": "function <large string>",
+          "some": "function <large string>",
+          "find": "function <large string>",
+          "findIndex": "function <large string>",
+          "entries": "function <large string>",
+          "keys": "function <large string>",
+          "values": "function <large string>",
+          "Symbol.iterator": "function <large string>",
+          "Symbol.unscopables": "Object {...}",
+          "fill": "function <large string>",
+          "copyWithin": "function <large string>",
+          "includes": "function <large string>",
+          "length": "number 25",
+          "[24]": "string 22"
+        },
+        "length": "number 1",
+        "[0]": "string \"j2\""
+      },
+      "k1": {
+        "#__proto__": {
+          "#__proto__": "Array [...]",
+          "length": "number 1",
+          "[0]": "string \"j2\""
+        },
+        "length": "number 4",
+        "[3]": "string 123"
+      },
+      "dummy": "undefined undefined"
+    },
+    "globals": {
+      "WScript": {
+        "#__proto__": "Object {...}",
+        "Echo": "function Echo",
+        "Quit": "function Quit",
+        "LoadScriptFile": "function LoadScriptFile",
+        "LoadScript": "function LoadScript",
+        "LoadModule": "function LoadModule",
+        "SetTimeout": "function SetTimeout",
+        "ClearTimeout": "function ClearTimeout",
+        "Attach": "function Attach",
+        "Detach": "function Detach",
+        "DumpFunctionPosition": "function <large string>",
+        "RequestAsyncBreak": "function <large string>",
+        "Edit": "function Edit",
+        "Platform": "Object {...}",
+        "Arguments": "Array []"
+      },
+      "print": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string print",
+        "caller": "object null",
+        "arguments": "object null"
+      },
+      "console": {
+        "#__proto__": "Object {...}",
+        "log": "function log"
+      },
+      "foo": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string foo",
+        "caller": "object null",
+        "arguments": "Object {...}",
+        "length": "number 0"
+      },
+      "foo1": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string foo1",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 0"
+      },
+      "foo2": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string foo2",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 0"
+      }
+    }
+  },
+  {
+    "this": {
+      "telemetryLog": {
+        "#__proto__": "function <large string>",
+        "length": "number 3",
+        "name": "string telemetryLog",
+        "caller": "object null",
+        "arguments": "object null"
+      },
+      "console": {
+        "#__proto__": "Object {...}",
+        "log": "function log"
+      },
+      "foo": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string foo",
+        "caller": "object null",
+        "arguments": "Object {...}",
+        "length": "number 0"
+      },
+      "foo1": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string foo1",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 0"
+      },
+      "foo2": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string foo2",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 0"
+      }
+    },
+    "arguments": {
+      "#__proto__": {
+        "constructor": "function <large string>",
+        "hasOwnProperty": "function <large string>",
+        "propertyIsEnumerable": "function <large string>",
+        "isPrototypeOf": "function <large string>",
+        "toLocaleString": "function <large string>",
+        "toString": "function <large string>",
+        "valueOf": "function <large string>",
+        "#__proto__": "object null",
+        "__defineGetter__": "function <large string>",
+        "__defineSetter__": "function <large string>",
+        "__lookupGetter__": "function <large string>",
+        "__lookupSetter__": "function <large string>"
+      },
+      "length": "number 0",
+      "callee": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string foo",
+        "caller": "object null",
+        "arguments": "Object {...}",
+        "length": "number 0"
+      },
+      "Symbol.iterator": {
+        "#__proto__": "function <large string>",
+        "length": "number 0",
+        "name": "string values",
+        "caller": "object null",
+        "arguments": "object null"
+      }
+    },
+    "locals": {
+      "j1": {
+        "#__proto__": {
+          "#__proto__": "Object {...}",
+          "constructor": "function <large string>",
+          "push": "function <large string>",
+          "concat": "function <large string>",
+          "join": "function <large string>",
+          "pop": "function <large string>",
+          "reverse": "function <large string>",
+          "shift": "function <large string>",
+          "slice": "function <large string>",
+          "sort": "function <large string>",
+          "splice": "function <large string>",
+          "toLocaleString": "function <large string>",
+          "toString": "function <large string>",
+          "unshift": "function <large string>",
+          "indexOf": "function <large string>",
+          "every": "function <large string>",
+          "filter": "function <large string>",
+          "forEach": "function <large string>",
+          "lastIndexOf": "function <large string>",
+          "map": "function <large string>",
+          "reduce": "function <large string>",
+          "reduceRight": "function <large string>",
+          "some": "function <large string>",
+          "find": "function <large string>",
+          "findIndex": "function <large string>",
+          "entries": "function <large string>",
+          "keys": "function <large string>",
+          "values": "function <large string>",
+          "Symbol.iterator": "function <large string>",
+          "Symbol.unscopables": "Object {...}",
+          "fill": "function <large string>",
+          "copyWithin": "function <large string>",
+          "includes": "function <large string>",
+          "length": "number 25",
+          "[24]": "string 22"
+        },
+        "length": "number 1000000001",
+        "[1000000000]": "string 20"
+      },
+      "m1": {
+        "#__proto__": {
+          "#__proto__": "Object {...}",
+          "constructor": "function <large string>",
+          "push": "function <large string>",
+          "concat": "function <large string>",
+          "join": "function <large string>",
+          "pop": "function <large string>",
+          "reverse": "function <large string>",
+          "shift": "function <large string>",
+          "slice": "function <large string>",
+          "sort": "function <large string>",
+          "splice": "function <large string>",
+          "toLocaleString": "function <large string>",
+          "toString": "function <large string>",
+          "unshift": "function <large string>",
+          "indexOf": "function <large string>",
+          "every": "function <large string>",
+          "filter": "function <large string>",
+          "forEach": "function <large string>",
+          "lastIndexOf": "function <large string>",
+          "map": "function <large string>",
+          "reduce": "function <large string>",
+          "reduceRight": "function <large string>",
+          "some": "function <large string>",
+          "find": "function <large string>",
+          "findIndex": "function <large string>",
+          "entries": "function <large string>",
+          "keys": "function <large string>",
+          "values": "function <large string>",
+          "Symbol.iterator": "function <large string>",
+          "Symbol.unscopables": "Object {...}",
+          "fill": "function <large string>",
+          "copyWithin": "function <large string>",
+          "includes": "function <large string>",
+          "length": "number 25",
+          "[24]": "string 22"
+        },
+        "length": "number 3000000001",
+        "[0]": "string 2",
+        "[1]": "string 34",
+        "[3000000000]": "string \"very far\""
+      },
+      "j2": {
+        "#__proto__": {
+          "#__proto__": "Object {...}",
+          "constructor": "function <large string>",
+          "push": "function <large string>",
+          "concat": "function <large string>",
+          "join": "function <large string>",
+          "pop": "function <large string>",
+          "reverse": "function <large string>",
+          "shift": "function <large string>",
+          "slice": "function <large string>",
+          "sort": "function <large string>",
+          "splice": "function <large string>",
+          "toLocaleString": "function <large string>",
+          "toString": "function <large string>",
+          "unshift": "function <large string>",
+          "indexOf": "function <large string>",
+          "every": "function <large string>",
+          "filter": "function <large string>",
+          "forEach": "function <large string>",
+          "lastIndexOf": "function <large string>",
+          "map": "function <large string>",
+          "reduce": "function <large string>",
+          "reduceRight": "function <large string>",
+          "some": "function <large string>",
+          "find": "function <large string>",
+          "findIndex": "function <large string>",
+          "entries": "function <large string>",
+          "keys": "function <large string>",
+          "values": "function <large string>",
+          "Symbol.iterator": "function <large string>",
+          "Symbol.unscopables": "Object {...}",
+          "fill": "function <large string>",
+          "copyWithin": "function <large string>",
+          "includes": "function <large string>",
+          "length": "number 25",
+          "[24]": "string 22"
+        },
+        "length": "number 1",
+        "[0]": "string \"j2\""
+      },
+      "k1": {
+        "#__proto__": {
+          "#__proto__": "Array [...]",
+          "length": "number 1",
+          "[0]": "string \"j2\""
+        },
+        "length": "number 10",
+        "[3]": "string 123"
+      },
+      "dummy": {
+        "#__proto__": {
+          "constructor": "function <large string>",
+          "hasOwnProperty": "function <large string>",
+          "propertyIsEnumerable": "function <large string>",
+          "isPrototypeOf": "function <large string>",
+          "toLocaleString": "function <large string>",
+          "toString": "function <large string>",
+          "valueOf": "function <large string>",
+          "#__proto__": "object null",
+          "__defineGetter__": "function <large string>",
+          "__defineSetter__": "function <large string>",
+          "__lookupGetter__": "function <large string>",
+          "__lookupSetter__": "function <large string>"
+        },
+        "x": {
+          "#__proto__": "Array [...]",
+          "length": "number 3000000001",
+          "[0]": "string 2",
+          "[1]": "string 34",
+          "[3000000000]": "string \"very far\""
+        }
+      }
+    },
+    "globals": {
+      "WScript": {
+        "#__proto__": "Object {...}",
+        "Echo": "function Echo",
+        "Quit": "function Quit",
+        "LoadScriptFile": "function LoadScriptFile",
+        "LoadScript": "function LoadScript",
+        "LoadModule": "function LoadModule",
+        "SetTimeout": "function SetTimeout",
+        "ClearTimeout": "function ClearTimeout",
+        "Attach": "function Attach",
+        "Detach": "function Detach",
+        "DumpFunctionPosition": "function <large string>",
+        "RequestAsyncBreak": "function <large string>",
+        "Edit": "function Edit",
+        "Platform": "Object {...}",
+        "Arguments": "Array []"
+      },
+      "print": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string print",
+        "caller": "object null",
+        "arguments": "object null"
+      },
+      "console": {
+        "#__proto__": "Object {...}",
+        "log": "function log"
+      },
+      "foo": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string foo",
+        "caller": "object null",
+        "arguments": "Object {...}",
+        "length": "number 0"
+      },
+      "foo1": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string foo1",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 0"
+      },
+      "foo2": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string foo2",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 0"
+      }
+    }
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "foo": "function <large string>",
+      "foo1": "function <large string>",
+      "foo2": "function <large string>"
+    },
+    "locals": {
+      "obj": {
+        "#__proto__": "Object {...}",
+        "[0]": "string 0"
+      },
+      "arguments": {
+        "#__proto__": "Object {...}",
+        "length": "number 1",
+        "callee": "function <large string>",
+        "Symbol.iterator": "function <large string>",
+        "[0]": "string 10"
+      }
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "foo": "function <large string>",
+      "foo1": "function <large string>",
+      "foo2": "function <large string>"
+    }
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "foo": "function <large string>",
+      "foo1": "function <large string>",
+      "foo2": "function <large string>"
+    },
+    "locals": {
+      "obj": {
+        "#__proto__": "Object {...}",
+        "[0]": "string 0",
+        "[1]": "string 1"
+      },
+      "arguments": {
+        "#__proto__": "Object {...}",
+        "length": "number 1",
+        "callee": "function <large string>",
+        "Symbol.iterator": "function <large string>",
+        "[0]": "string 10"
+      }
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "foo": "function <large string>",
+      "foo1": "function <large string>",
+      "foo2": "function <large string>"
+    }
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "foo": "function <large string>",
+      "foo1": "function <large string>",
+      "foo2": "function <large string>"
+    },
+    "locals": {
+      "obj": {
+        "#__proto__": "Object {...}",
+        "[0]": "string 0",
+        "[1]": "string 1"
+      },
+      "arguments": {
+        "#__proto__": "Object {...}",
+        "length": "number 1",
+        "callee": "function <large string>",
+        "Symbol.iterator": "function <large string>",
+        "[0]": "string 10",
+        "[1]": "string 22"
+      }
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "foo": "function <large string>",
+      "foo1": "function <large string>",
+      "foo2": "function <large string>"
+    }
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "foo": "function <large string>",
+      "foo1": "function <large string>",
+      "foo2": "function <large string>"
+    },
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 0",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>"
+    },
+    "locals": {
+      "o": {
+        "#__proto__": "Object {...}",
+        "a": "number 1",
+        "[1]": "Object function(){}"
+      },
+      "j": {
+        "#__proto__": "Array [...]",
+        "x": "Object {...}",
+        "length": "number 1",
+        "[0]": "string 13"
+      }
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "foo": "function <large string>",
+      "foo1": "function <large string>",
+      "foo2": "function <large string>"
+    }
+  }
+]

+ 55 - 0
test/DebuggerCommon/array_prototest.js

@@ -0,0 +1,55 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+function foo()
+{
+	var j1 = new Array;
+	var m1 = [2,34];
+	Array.prototype[24] = 22;
+
+	j1[1000000000] = 20;
+
+	var j2 = ["j2"];
+	var k1 = [];
+	k1.__proto__ = j2;
+	k1[3] = 123;
+
+	k1.length = 10;  /**bp:locals(2);resume('continue')**/
+
+	var dummy = {};  
+	dummy.x = m1;
+	dummy.x[3000000000] = "very far";
+	dummy.x;         /**bp:locals(2);resume('continue')**/
+}
+foo();
+
+function foo1()
+{
+	var obj = {};
+	obj[0] = 0;
+
+	Object.defineProperty(obj, "1", {value: 1, enumerable: false});       /**bp:locals(1)**/
+
+	obj;                          /**bp:locals(1)**/
+
+	Object.defineProperty(arguments, "1", {value: 22, enumerable: false});       
+
+	obj;                          /**bp:locals(1)**/
+}
+foo1(10);
+
+function foo2()
+{
+	var o = {
+		a: 1,
+		"1": function(){}
+	};
+	var j = [13];
+	j.x = {};
+	o;        				         /**bp:locals(1)**/                      
+}
+foo2();
+
+WScript.Echo("pass");

+ 34 - 0
test/DebuggerCommon/arraytoes5array.js

@@ -0,0 +1,34 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// This test depicts that how javascript array changes to ES5 array while fetching values.
+
+var test10_a = [1];
+
+Object.defineProperty(
+    test10_a,
+    "p",
+    {
+        configurable: true,
+        enumerable: true,
+        get: function() {
+            Object.defineProperty(
+                test10_a,
+                "1",
+                {
+                    configurable: true,
+                    enumerable: true,
+                    get: function() { return 5; },
+                    set: function() { }
+                });
+            return 2;
+        }
+    });
+
+test10_a;
+test10_a;               /**bp:evaluate('test10_a',1);evaluate('test10_a',1)**/
+
+WScript.Echo("Pass");
+	

+ 23 - 0
test/DebuggerCommon/arraytoes5array.js.dbg.baseline

@@ -0,0 +1,23 @@
+[
+  {
+    "evaluate": {
+      "test10_a": {
+        "#__proto__": "Array []",
+        "p": "number 2",
+        "length": "number 2",
+        "[0]": "string 1"
+      }
+    }
+  },
+  {
+    "evaluate": {
+      "test10_a": {
+        "#__proto__": "Array []",
+        "p": "number 2",
+        "length": "number 2",
+        "[0]": "string 1",
+        "[1]": "string 5"
+      }
+    }
+  }
+]

+ 25 - 0
test/DebuggerCommon/attachAfterException.js

@@ -0,0 +1,25 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// This test validates that if a function throws an exception after attach that function can still be generated in the debug mode.
+
+function bar() {
+    try {
+        function foo() {
+            abc.def = 10;                   /**bp:stack();locals()**/
+            return 10;
+        }
+        foo();
+    }
+    catch (e) {
+        e;
+    }
+
+    WScript.Echo("Pass");
+}
+
+bar();
+WScript.Attach(bar);
+

+ 22 - 0
test/DebuggerCommon/attachAfterException.js.dbg.baseline

@@ -0,0 +1,22 @@
+[
+  {
+    "callStack": [
+      {
+        "line": 10,
+        "column": 12,
+        "sourceText": "abc.def = 10",
+        "function": "foo"
+      },
+      {
+        "line": 13,
+        "column": 8,
+        "sourceText": "foo()",
+        "function": "bar"
+      }
+    ]
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}"
+  }
+]

+ 41 - 0
test/DebuggerCommon/attachWithDeferParse.js

@@ -0,0 +1,41 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Validate the dynamic attach with forcedeferparse
+
+eval("var inEvalFunc1 = function () { return 'inEvalFunc1'; }");
+
+function foo() {
+    var a = 10;
+    function f1() {
+        function f11() {
+            return a;       /**bp:locals(1)**/
+        }
+        f11();
+    }
+    f1();
+
+    function g() {
+        return 10;
+    }
+    g();                  /**bp:locals(1)**/
+
+    try {
+        abc.def = 10;
+    }
+    catch (t) {
+        var s = function (a, b) {
+            eval('');
+            return a + b;
+        }
+        t;                      /**bp:locals(1)**/
+    }
+
+    WScript.Echo("Pass");
+}
+
+CollectGarbage();
+
+WScript.Attach(foo);

+ 125 - 0
test/DebuggerCommon/attachWithDeferParse.js.dbg.baseline

@@ -0,0 +1,125 @@
+[
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "foo": "function <large string>",
+      "inEvalFunc1": "function <large string>"
+    },
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 0",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>"
+    },
+    "scopes0": {
+      "f1": "function <large string>",
+      "g": "function <large string>",
+      "a": "number 10",
+      "s": "undefined undefined"
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "foo": "function <large string>",
+      "inEvalFunc1": "function <large string>"
+    }
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "foo": "function <large string>",
+      "inEvalFunc1": "function <large string>"
+    },
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 0",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>"
+    },
+    "locals": {
+      "f1": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string f1",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 0"
+      },
+      "g": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string g",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 0"
+      },
+      "a": "number 10",
+      "s": "undefined undefined"
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "foo": "function <large string>",
+      "inEvalFunc1": "function <large string>"
+    }
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "foo": "function <large string>",
+      "inEvalFunc1": "function <large string>"
+    },
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 0",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>"
+    },
+    "locals": {
+      "t": {
+        "#__proto__": "Error ",
+        "message": "string <large string>",
+        "description": "string <large string>",
+        "number": "number -2146823279",
+        "stack": "string <large string>"
+      },
+      "f1": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string f1",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 0"
+      },
+      "g": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string g",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 0"
+      },
+      "a": "number 10",
+      "s": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string ",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 2"
+      }
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "foo": "function <large string>",
+      "inEvalFunc1": "function <large string>"
+    }
+  }
+]

+ 28 - 0
test/DebuggerCommon/attachdetach-delaycapture.js

@@ -0,0 +1,28 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+function f(formal) {
+
+    // arguments references force scope objects but allow delayed capture in non-debug mode only.
+    // Verify that scope slot allocation is still the same in both modes.
+
+    var local;
+
+    local = 0;
+    var i = (function (x) {
+        arguments[0];
+        return ++local;
+    })();
+    if (i !== 1 || local !== 1) {
+        WScript.Echo('fail: i == ', i, ', local == ', local);
+        throw 0;
+    }
+    arguments[0];
+}
+
+WScript.Attach(f);
+WScript.Detach(f);
+
+WScript.Echo('pass');

+ 1 - 0
test/DebuggerCommon/attachdetach-delaycapture.js.dbg.baseline

@@ -0,0 +1 @@
+[]

+ 17 - 0
test/DebuggerCommon/blockScopeActivationObjectAsSlotArray.js

@@ -0,0 +1,17 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+function test() {
+    function nested() {
+        eval(""); // eval here makes test's scope a non-dynamic object scope
+    }
+    /**bp:locals()**/
+    let l = 10;
+    /**bp:locals()**/
+    const c = 20;
+    /**bp:locals(),evaluate('c=30'),locals()**/
+}
+test.apply({});
+WScript.Echo("PASSED");

+ 43 - 0
test/DebuggerCommon/blockScopeActivationObjectAsSlotArray.js.dbg.baseline

@@ -0,0 +1,43 @@
+[
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "nested": "function function nested() {\r\n        eval(\"\"); // eval here makes test's scope a non-dynamic object scope\r\n    }",
+      "l": "string [Uninitialized block variable]",
+      "c": "string [Uninitialized block variable]"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "nested": "function function nested() {\r\n        eval(\"\"); // eval here makes test's scope a non-dynamic object scope\r\n    }",
+      "l": "number 10",
+      "c": "string [Uninitialized block variable]"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "nested": "function function nested() {\r\n        eval(\"\"); // eval here makes test's scope a non-dynamic object scope\r\n    }",
+      "l": "number 10",
+      "c": "number 20"
+    }
+  },
+  {
+    "evaluate": {
+      "c=30": "Error Assignment to const"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "nested": "function function nested() {\r\n        eval(\"\"); // eval here makes test's scope a non-dynamic object scope\r\n    }",
+      "l": "number 10",
+      "c": "number 20"
+    }
+  }
+]

+ 29 - 0
test/DebuggerCommon/blockScopeActivationObjectCapture.js

@@ -0,0 +1,29 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+function verify(){}
+function Run(){
+    function verify(act, exp, msg) { }
+    var level_0_identifier_0 = "level0";
+    
+    // upper scope - that is closed over in level2func
+    {
+        let level_1_identifier_0= "level1_0";  /* captured */
+        const level_1_identifier_1= "level1_1";   /* not captured by nested function */
+        let level_1_identifier_2; /**bp:locals(1); evaluate('level_0_identifier_0'); evaluate('level_1_identifier_0');**/  /* not initialized & captured */ 
+        
+		function level2Func(level_2_identifier_0) {
+            eval("");
+            var level_2_identifier_1 = "level2";  
+            verify(level_1_identifier_0, "level1level1", "[Let Const - Function Declaration] level_1_identifier_0 at level 2"); 
+            level_1_identifier_2; /**bp:locals(1);evaluate('level_0_identifier_0'); evaluate('level_1_identifier_0');**/ 
+        }
+        level2Func("level2");
+        level2Func = undefined;
+        level_1_identifier_2 = "test";
+    }
+}
+Run.apply({});
+WScript.Echo("PASSED");

+ 97 - 0
test/DebuggerCommon/blockScopeActivationObjectCapture.js.dbg.baseline

@@ -0,0 +1,97 @@
+[
+  {
+    "this": {},
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 0",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>"
+    },
+    "locals": {
+      "level2Func": {
+        "#__proto__": "function function() {\n    [native code]\n}",
+        "prototype": "Object {...}",
+        "name": "string level2Func",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 1"
+      },
+      "level_1_identifier_0": "string level1_0",
+      "level_1_identifier_1": "string level1_1",
+      "level_1_identifier_2": "string [Uninitialized block variable]",
+      "verify": {
+        "#__proto__": "function function() {\n    [native code]\n}",
+        "prototype": "Object {...}",
+        "name": "string verify",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 3"
+      },
+      "level_0_identifier_0": "string level0"
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "verify": "function function verify(){}",
+      "Run": "function <large string>"
+    }
+  },
+  {
+    "evaluate": {
+      "level_0_identifier_0": "string level0"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_0": "string level1_0"
+    }
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "verify": "function function verify(){}",
+      "Run": "function <large string>"
+    },
+    "locals": {
+      "level_2_identifier_0": "string level2",
+      "arguments": {
+        "#__proto__": "Object {...}",
+        "length": "number 1",
+        "callee": "function <large string>",
+        "Symbol.iterator": "function <large string>",
+        "[0]": "string \"level2\""
+      },
+      "level_2_identifier_1": "string level2"
+    },
+    "scopes0": {
+      "level2Func": "function <large string>",
+      "level_1_identifier_0": "string level1_0",
+      "level_1_identifier_1": "string level1_1",
+      "level_1_identifier_2": "undefined undefined"
+    },
+    "scopes1": {
+      "verify": "function <large string>",
+      "level_0_identifier_0": "string level0",
+      "level2Func": "function <large string>"
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "verify": "function function verify(){}",
+      "Run": "function <large string>"
+    }
+  },
+  {
+    "evaluate": {
+      "level_0_identifier_0": "string level0"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_0": "string level1_0"
+    }
+  }
+]

+ 15 - 0
test/DebuggerCommon/blockScopeActivationObjectDeadZoneTest.js

@@ -0,0 +1,15 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that let/const variables display properly when leaving a dead zone in the activation object case.
+function blockScopeActivationObjectDeadZoneTest() {
+    var a = 0; /**bp:locals()**/
+    let b = 1; /**bp:locals()**/
+    const c = 2; /**bp:locals()**/
+    eval(""); /**bp:locals()**/
+}
+
+blockScopeActivationObjectDeadZoneTest();
+WScript.Echo("PASSED");

+ 38 - 0
test/DebuggerCommon/blockScopeActivationObjectDeadZoneTest.js.dbg.baseline

@@ -0,0 +1,38 @@
+[
+  {
+    "this": "Object {...}",
+    "locals": {
+      "arguments": "Object {...}",
+      "a": "undefined undefined",
+      "b": "string [Uninitialized block variable]",
+      "c": "string [Uninitialized block variable]"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "arguments": "Object {...}",
+      "a": "number 0",
+      "b": "string [Uninitialized block variable]",
+      "c": "string [Uninitialized block variable]"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "arguments": "Object {...}",
+      "a": "number 0",
+      "b": "number 1",
+      "c": "string [Uninitialized block variable]"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "arguments": "Object {...}",
+      "a": "number 0",
+      "b": "number 1",
+      "c": "number 2"
+    }
+  }
+]

+ 17 - 0
test/DebuggerCommon/blockScopeBasicLetConstTest.js

@@ -0,0 +1,17 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that let/const variables display properly in locals.
+function blockScopeBasicLetConstTestFunc() {
+    let integer = 1;
+    let string = "2";
+    let object = { p1: 3, p2: 4 };
+    const constInteger = 5;
+    const constString = "6";
+    const constObject = { cp1: { cp2: 7, cp3: 8 }, cp4: 9 };
+    return 0;// /**bp:locals(2)**/
+}
+blockScopeBasicLetConstTestFunc.apply({});
+WScript.Echo("PASSED");

+ 121 - 0
test/DebuggerCommon/blockScopeBasicLetConstTest.js.dbg.baseline

@@ -0,0 +1,121 @@
+[
+  {
+    "this": {},
+    "arguments": {
+      "#__proto__": {
+        "constructor": "function <large string>",
+        "hasOwnProperty": "function <large string>",
+        "propertyIsEnumerable": "function <large string>",
+        "isPrototypeOf": "function <large string>",
+        "toLocaleString": "function <large string>",
+        "toString": "function <large string>",
+        "valueOf": "function <large string>",
+        "#__proto__": "object null",
+        "__defineGetter__": "function <large string>",
+        "__defineSetter__": "function <large string>",
+        "__lookupGetter__": "function <large string>",
+        "__lookupSetter__": "function <large string>"
+      },
+      "length": "number 0",
+      "callee": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string <large string>",
+        "caller": "object null",
+        "arguments": "Object {...}",
+        "length": "number 0"
+      },
+      "Symbol.iterator": {
+        "#__proto__": "function <large string>",
+        "length": "number 0",
+        "name": "string values",
+        "caller": "object null",
+        "arguments": "object null"
+      }
+    },
+    "locals": {
+      "integer": "number 1",
+      "string": "string 2",
+      "object": {
+        "#__proto__": {
+          "constructor": "function <large string>",
+          "hasOwnProperty": "function <large string>",
+          "propertyIsEnumerable": "function <large string>",
+          "isPrototypeOf": "function <large string>",
+          "toLocaleString": "function <large string>",
+          "toString": "function <large string>",
+          "valueOf": "function <large string>",
+          "#__proto__": "object null",
+          "__defineGetter__": "function <large string>",
+          "__defineSetter__": "function <large string>",
+          "__lookupGetter__": "function <large string>",
+          "__lookupSetter__": "function <large string>"
+        },
+        "p1": "number 3",
+        "p2": "number 4"
+      },
+      "constInteger": "number 5",
+      "constString": "string 6",
+      "constObject": {
+        "#__proto__": {
+          "constructor": "function <large string>",
+          "hasOwnProperty": "function <large string>",
+          "propertyIsEnumerable": "function <large string>",
+          "isPrototypeOf": "function <large string>",
+          "toLocaleString": "function <large string>",
+          "toString": "function <large string>",
+          "valueOf": "function <large string>",
+          "#__proto__": "object null",
+          "__defineGetter__": "function <large string>",
+          "__defineSetter__": "function <large string>",
+          "__lookupGetter__": "function <large string>",
+          "__lookupSetter__": "function <large string>"
+        },
+        "cp1": {
+          "#__proto__": "Object {...}",
+          "cp2": "number 7",
+          "cp3": "number 8"
+        },
+        "cp4": "number 9"
+      }
+    },
+    "globals": {
+      "WScript": {
+        "#__proto__": "Object {...}",
+        "Echo": "function Echo",
+        "Quit": "function Quit",
+        "LoadScriptFile": "function LoadScriptFile",
+        "LoadScript": "function LoadScript",
+        "LoadModule": "function LoadModule",
+        "SetTimeout": "function SetTimeout",
+        "ClearTimeout": "function ClearTimeout",
+        "Attach": "function Attach",
+        "Detach": "function Detach",
+        "DumpFunctionPosition": "function <large string>",
+        "RequestAsyncBreak": "function <large string>",
+        "Edit": "function Edit",
+        "Platform": "Object {...}",
+        "Arguments": "Array []"
+      },
+      "print": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string print",
+        "caller": "object null",
+        "arguments": "object null"
+      },
+      "console": {
+        "#__proto__": "Object {...}",
+        "log": "function log"
+      },
+      "blockScopeBasicLetConstTestFunc": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string <large string>",
+        "caller": "object null",
+        "arguments": "Object {...}",
+        "length": "number 0"
+      }
+    }
+  }
+]

+ 30 - 0
test/DebuggerCommon/blockScopeBasicScopingTest.js

@@ -0,0 +1,30 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that let/const variables properly enter and leave locals display
+// when a block is entered/exited.
+function blockScopeBasicScopingTestFunc() {
+    var a = 0;
+
+    // Out of locals.
+    a;/**bp:locals()**/
+    {
+        let integer = 1;
+        let string = "2";
+        let object = { p1: 3, p2: 4 };
+        const constInteger = 5;
+        const constString = "6";
+        const constObject = { cp1: { cp2: 7, cp3: 8 }, cp4: 9 };
+
+        // In locals.
+        integer; /**bp:locals()**/
+    }
+    
+    // Out of locals again.
+    a;/**bp:locals()**/
+    return 0;
+}
+blockScopeBasicScopingTestFunc();
+WScript.Echo("PASSED");

+ 29 - 0
test/DebuggerCommon/blockScopeBasicScopingTest.js.dbg.baseline

@@ -0,0 +1,29 @@
+[
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "number 0"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "integer": "number 1",
+      "string": "string 2",
+      "object": "Object {...}",
+      "constInteger": "number 5",
+      "constString": "string 6",
+      "constObject": "Object {...}",
+      "a": "number 0"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "number 0"
+    }
+  }
+]

+ 26 - 0
test/DebuggerCommon/blockScopeDeadZoneTest.js

@@ -0,0 +1,26 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that let/const variables disappear when a breakpoint is
+// set the in the dead zone before the variable is initialized.
+function blockScopeDeadZoneTestFunc() {
+    var a = 0;
+    a; /**bp:locals()**/
+    let b = 1;
+    const cConst = 2;
+    a; /**bp:locals()**/
+    {
+        a; /**bp:locals()**/
+        const dConst = 3;
+        let e = 4;
+        dConst;
+        e;
+        b; /**bp:locals()**/
+    }
+    
+    return 0; /**bp:locals()**/
+}
+blockScopeDeadZoneTestFunc();
+WScript.Echo("PASSED");

+ 51 - 0
test/DebuggerCommon/blockScopeDeadZoneTest.js.dbg.baseline

@@ -0,0 +1,51 @@
+[
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "b": "string [Uninitialized block variable]",
+      "cConst": "string [Uninitialized block variable]",
+      "a": "number 0"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "b": "number 1",
+      "cConst": "number 2",
+      "a": "number 0"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "dConst": "string [Uninitialized block variable]",
+      "e": "string [Uninitialized block variable]",
+      "b": "number 1",
+      "cConst": "number 2",
+      "a": "number 0"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "dConst": "number 3",
+      "e": "number 4",
+      "b": "number 1",
+      "cConst": "number 2",
+      "a": "number 0"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "b": "number 1",
+      "cConst": "number 2",
+      "a": "number 0"
+    }
+  }
+]

+ 13 - 0
test/DebuggerCommon/blockScopeEvalTest.js

@@ -0,0 +1,13 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that let/const variables appear properly as part of an
+// eval() call.
+function blockScopeEvalTestFunc() {
+    eval("{ let b = 1; b++; /**bp:locals()**/ }");
+    return 0;
+}
+blockScopeEvalTestFunc();
+WScript.Echo("PASSED");

+ 1 - 0
test/DebuggerCommon/blockScopeEvalTest.js.dbg.baseline

@@ -0,0 +1 @@
+[]

+ 42 - 0
test/DebuggerCommon/blockScopeExpressionEquationDeadZoneTest.js

@@ -0,0 +1,42 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that expression evaluation works
+// for variables in a dead zone.
+
+function test() {    
+    /**bp:evaluate('a + 1')**/
+    let a = 0;
+    /**bp:evaluate('a + 1')**/
+    a;
+    /**bp:evaluate('c + \'1\'')**/
+    const c = 1;
+    /**bp:evaluate('c + \'1\'')**/
+    var b = 1;
+    var d = "abc";
+    /**bp: logJson('Outside block');locals()**/
+    if (b == 1) {
+        a;/**bp: logJson('Block with let');locals()**/
+        a;/**bp: evaluate('b')**/
+        a;/**bp: evaluate('b//')**/
+        let b = 22;
+        b;/**bp: evaluate('b')**/
+        b;/**bp: evaluate('b//')**/
+    }
+    if (b == 1) {
+        a;/**bp: logJson('Block with const');locals()**/
+        a;/**bp: evaluate('d')**/
+        a;/**bp: evaluate('d//')**/
+        a;/**bp: evaluate('const d = 5; d;')**/
+        a;/**bp: evaluate('d')**/
+        a;/**bp: evaluate('d = 5; d;')**/
+        const d = 33;
+        d;/**bp: evaluate('d')**/
+        d;/**bp: evaluate('d//')**/
+    }
+};
+
+test();
+WScript.Echo("Pass");

+ 116 - 0
test/DebuggerCommon/blockScopeExpressionEquationDeadZoneTest.js.dbg.baseline

@@ -0,0 +1,116 @@
+[
+  {
+    "evaluate": {
+      "a + 1": "Error Use before declaration"
+    }
+  },
+  {
+    "evaluate": {
+      "a + 1": "number 1"
+    }
+  },
+  {
+    "evaluate": {
+      "c + '1'": "Error Use before declaration"
+    }
+  },
+  {
+    "evaluate": {
+      "c + '1'": "string 11"
+    }
+  },
+  {
+    "log": "Outside block"
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "a": "number 0",
+      "c": "number 1",
+      "b": "number 1",
+      "d": "string abc"
+    }
+  },
+  {
+    "log": "Block with let"
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "b": "number 1",
+      "a": "number 0",
+      "c": "number 1",
+      "d": "string abc"
+    }
+  },
+  {
+    "evaluate": {
+      "b": "string [Uninitialized block variable]"
+    }
+  },
+  {
+    "evaluate": {
+      "b//": "Error Use before declaration"
+    }
+  },
+  {
+    "evaluate": {
+      "b": "number 22"
+    }
+  },
+  {
+    "evaluate": {
+      "b//": "number 22"
+    }
+  },
+  {
+    "log": "Block with const"
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "d": "string abc",
+      "a": "number 0",
+      "c": "number 1",
+      "b": "number 1"
+    }
+  },
+  {
+    "evaluate": {
+      "d": "string [Uninitialized block variable]"
+    }
+  },
+  {
+    "evaluate": {
+      "d//": "Error Use before declaration"
+    }
+  },
+  {
+    "evaluate": {
+      "const d = 5; d;": "number 5"
+    }
+  },
+  {
+    "evaluate": {
+      "d": "string [Uninitialized block variable]"
+    }
+  },
+  {
+    "evaluate": {
+      "d = 5; d;": "Error Assignment to const"
+    }
+  },
+  {
+    "evaluate": {
+      "d": "number 33"
+    }
+  },
+  {
+    "evaluate": {
+      "d//": "number 33"
+    }
+  }
+]

+ 20 - 0
test/DebuggerCommon/blockScopeExpressionNoWriteOfConst.js

@@ -0,0 +1,20 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+
+// Tests that attempting to modify a constant
+// through expression evaluation fails.
+// Bug 168330.
+
+function blockScopeExpressionEvaluation() {
+    const a = 1;
+    let b = 2;
+    a; /**bp:evaluate('a++');evaluate('a')**/
+    b; /**bp:evaluate('b++');evaluate('b')**/
+}
+
+blockScopeExpressionEvaluation();
+
+WScript.Echo("PASSED");

+ 22 - 0
test/DebuggerCommon/blockScopeExpressionNoWriteOfConst.js.dbg.baseline

@@ -0,0 +1,22 @@
+[
+  {
+    "evaluate": {
+      "a++": "Error <large string>"
+    }
+  },
+  {
+    "evaluate": {
+      "a": "number 1"
+    }
+  },
+  {
+    "evaluate": {
+      "b++": "number 2"
+    }
+  },
+  {
+    "evaluate": {
+      "b": "number 3"
+    }
+  }
+]

+ 21 - 0
test/DebuggerCommon/blockScopeExpressionSimpleDeadZoneTest.js

@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+
+// Tests that simple expression evaluation works
+// for variables in a dead zone.
+
+function test() {
+    /**bp:evaluate('a')**/
+    let a = 0;
+    /**bp:evaluate('a')**/
+    a;
+    /**bp:evaluate('c')**/
+    const c = 1;
+    /**bp:evaluate('c')**/
+};
+
+test();
+WScript.Echo("Pass");

+ 22 - 0
test/DebuggerCommon/blockScopeExpressionSimpleDeadZoneTest.js.dbg.baseline

@@ -0,0 +1,22 @@
+[
+  {
+    "evaluate": {
+      "a": "string [Uninitialized block variable]"
+    }
+  },
+  {
+    "evaluate": {
+      "a": "number 0"
+    }
+  },
+  {
+    "evaluate": {
+      "c": "string [Uninitialized block variable]"
+    }
+  },
+  {
+    "evaluate": {
+      "c": "number 1"
+    }
+  }
+]

+ 16 - 0
test/DebuggerCommon/blockScopeForTest.bug183991.js

@@ -0,0 +1,16 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that a let iterator at global scope reflects
+// properly in the debugger when the loop is at global
+// scope.
+// Bug #183991.
+
+var a = {x:2, y:1};
+for(let y in a){
+   y; /**bp:locals(1)**/
+}
+
+WScript.Echo('PASSED');

+ 42 - 0
test/DebuggerCommon/blockScopeForTest.bug183991.js.dbg.baseline

@@ -0,0 +1,42 @@
+[
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "a": "Object {...}"
+    },
+    "locals": {
+      "y": "string x",
+      "console": {
+        "#__proto__": "Object {...}",
+        "log": "function log"
+      },
+      "a": {
+        "#__proto__": "Object {...}",
+        "x": "number 2",
+        "y": "number 1"
+      }
+    },
+    "globals": {}
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "a": "Object {...}"
+    },
+    "locals": {
+      "y": "string y",
+      "console": {
+        "#__proto__": "Object {...}",
+        "log": "function log"
+      },
+      "a": {
+        "#__proto__": "Object {...}",
+        "x": "number 2",
+        "y": "number 1"
+      }
+    },
+    "globals": {}
+  }
+]

+ 17 - 0
test/DebuggerCommon/blockScopeForTest.js

@@ -0,0 +1,17 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that let/const variables appear properly as part of a for loop.
+function blockScopeForTestFunc() {
+    ; /**bp:locals()**/
+    for (let i = 0; i < 1; ++i)
+    {
+        const innerConst = 2;
+        i; /**bp:locals()**/
+    }
+    return 0; /**bp:locals()**/
+}
+blockScopeForTestFunc();
+WScript.Echo("PASSED");

+ 21 - 0
test/DebuggerCommon/blockScopeForTest.js.dbg.baseline

@@ -0,0 +1,21 @@
+[
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "i": "string [Uninitialized block variable]"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "innerConst": "number 2",
+      "i": "number 0"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}"
+  }
+]

+ 21 - 0
test/DebuggerCommon/blockScopeFunctionDeclarationActivationObjectTest.js

@@ -0,0 +1,21 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that function declaration bindings show correctly for the
+// activation object case.
+
+function test() {
+    var a = 1;
+    {
+        a; /**bp:locals()**/
+        function f() { }
+        eval("f()");
+        a; /**bp:locals()**/
+    }
+    a;/**bp:locals()**/
+}
+
+test();
+WScript.Echo("PASSED")

+ 26 - 0
test/DebuggerCommon/blockScopeFunctionDeclarationActivationObjectTest.js.dbg.baseline

@@ -0,0 +1,26 @@
+[
+  {
+    "this": "Object {...}",
+    "locals": {
+      "f": "function function f() { }",
+      "arguments": "Object {...}",
+      "a": "number 1"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "f": "function function f() { }",
+      "arguments": "Object {...}",
+      "a": "number 1"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "arguments": "Object {...}",
+      "a": "number 1",
+      "f": "function function f() { }"
+    }
+  }
+]

+ 20 - 0
test/DebuggerCommon/blockScopeFunctionDeclarationGlobalShadowingTest.bug305562.js

@@ -0,0 +1,20 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that function declaration bindings show correctly for the
+// global function case where shadowing occurs from above
+// (with no var binding created).
+// Bug 305562.
+
+let f = 'let f';
+f; /**bp:evaluate('f')**/
+if (true)
+{
+    function f() { }
+    f; /**bp:evaluate('f')**/
+}
+f; /**bp:evaluate('f')**/
+
+WScript.Echo("PASSED");

+ 17 - 0
test/DebuggerCommon/blockScopeFunctionDeclarationGlobalShadowingTest.bug305562.js.dbg.baseline

@@ -0,0 +1,17 @@
+[
+  {
+    "evaluate": {
+      "f": "string let f"
+    }
+  },
+  {
+    "evaluate": {
+      "f": "function function f() { }"
+    }
+  },
+  {
+    "evaluate": {
+      "f": "string let f"
+    }
+  }
+]

+ 41 - 0
test/DebuggerCommon/blockScopeFunctionDeclarationGlobalShadowingTest.bug308191.js

@@ -0,0 +1,41 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that function declaration bindings show correctly for the
+// global function case where shadowing occurs from above
+// (with no var binding created).
+// Bug 305562.
+
+function print(e){WScript.Echo(e)}
+(function ()
+{
+    for (var i = 0; i < 2; i += 1)
+    {
+        try
+        {
+            (function ()
+            {
+                "use strict";
+
+                if (i == 0)
+                    f(); /**bp:evaluate('f')**/
+
+                if (true)
+                {
+                    function f() { }
+                    f(); /**bp:evaluate('f')**/
+                }
+
+                f(); /**bp:evaluate('f')**/
+            })();
+        }
+        catch (e)
+        {
+            e; /**bp:evaluate('e')**/
+        }
+    }
+})();
+
+WScript.Echo("PASSED");

+ 27 - 0
test/DebuggerCommon/blockScopeFunctionDeclarationGlobalShadowingTest.bug308191.js.dbg.baseline

@@ -0,0 +1,27 @@
+[
+  {
+    "evaluate": {
+      "f": "Error 'f' is undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "e": "Error 'f' is undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "f": "function function f() { }"
+    }
+  },
+  {
+    "evaluate": {
+      "f": "Error 'f' is undefined"
+    }
+  },
+  {
+    "evaluate": {
+      "e": "Error 'f' is undefined"
+    }
+  }
+]

+ 16 - 0
test/DebuggerCommon/blockScopeFunctionDeclarationGlobalTest.js

@@ -0,0 +1,16 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that function declaration bindings show correctly for the
+// global function case.
+
+f;/**bp:locals()**/
+{
+    function f() { }
+    f(); /**bp:locals()**/
+}
+f();/**bp:locals()**/
+
+WScript.Echo("PASSED");

+ 23 - 0
test/DebuggerCommon/blockScopeFunctionDeclarationGlobalTest.js.dbg.baseline

@@ -0,0 +1,23 @@
+[
+  {
+    "this": "Object {...}",
+    "locals": {
+      "console": "Object {...}",
+      "f": "undefined undefined"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "f": "function function f() { }",
+      "console": "Object {...}"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "console": "Object {...}",
+      "f": "function function f() { }"
+    }
+  }
+]

+ 20 - 0
test/DebuggerCommon/blockScopeFunctionDeclarationRegSlotTest.js

@@ -0,0 +1,20 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that function declaration bindings show correctly for the
+// register slot case.
+
+function test() {
+    var a = 1;
+    {
+        a; /**bp:locals()**/
+        function f1() { }
+        a; /**bp:locals()**/
+    }
+    a;/**bp:locals()**/
+}
+
+test();
+WScript.Echo("PASSED")

+ 26 - 0
test/DebuggerCommon/blockScopeFunctionDeclarationRegSlotTest.js.dbg.baseline

@@ -0,0 +1,26 @@
+[
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "f1": "function <large string>",
+      "a": "number 1"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "f1": "function <large string>",
+      "a": "number 1"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "f1": "function <large string>",
+      "a": "number 1"
+    }
+  }
+]

+ 24 - 0
test/DebuggerCommon/blockScopeFunctionDeclarationSlotArrayTest.js

@@ -0,0 +1,24 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that function declaration bindings show correctly for the
+// slot array case.
+
+function test() {
+    var a = 1;
+    {
+        a; /**bp:locals()**/
+        function f() { }
+        function g() {
+            f();
+        }
+        g();
+        a; /**bp:locals()**/
+    }
+    a;/**bp:locals()**/
+}
+
+test();
+WScript.Echo("PASSED")

+ 29 - 0
test/DebuggerCommon/blockScopeFunctionDeclarationSlotArrayTest.js.dbg.baseline

@@ -0,0 +1,29 @@
+[
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "g": "function <large string>",
+      "f": "function function f() { }",
+      "a": "number 1"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "g": "function <large string>",
+      "f": "function function f() { }",
+      "a": "number 1"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "f": "function function f() { }",
+      "g": "function <large string>",
+      "a": "number 1"
+    }
+  }
+]

+ 27 - 0
test/DebuggerCommon/blockScopeFunctionRedeclarationTest.js

@@ -0,0 +1,27 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that redeclaration of a function works
+// and doesn't throw an assert.
+// Bug 325723.
+
+function test0() {
+    if (0) { }
+    else {
+        function test1(a) {
+            return a;
+        }
+        function test1(a) {
+            return a;
+        }
+
+        test1();
+        /**bp:locals()**/
+    }
+};
+
+test0();
+
+WScript.Echo("PASSED")

+ 9 - 0
test/DebuggerCommon/blockScopeFunctionRedeclarationTest.js.dbg.baseline

@@ -0,0 +1,9 @@
+[
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "test1": "function <large string>"
+    }
+  }
+]

+ 20 - 0
test/DebuggerCommon/blockScopeFunctionRedeclaration_blue523098.js

@@ -0,0 +1,20 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+function test0() {
+    (function () {
+        function foo() {
+            eval("");
+        };
+    })();
+    {
+        var x = 1;/**bp:locals();**/
+        function bar() {}
+        function bar() { return 1;}
+    }
+};
+test0();
+
+WScript.Echo("PASS");

+ 10 - 0
test/DebuggerCommon/blockScopeFunctionRedeclaration_blue523098.js.dbg.baseline

@@ -0,0 +1,10 @@
+[
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "bar": "function <large string>",
+      "x": "undefined undefined"
+    }
+  }
+]

+ 15 - 0
test/DebuggerCommon/blockScopeGlobalBlockTest.js

@@ -0,0 +1,15 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that let variables appear properly when nested inside of a global block.
+let a = 1;
+{
+    let b = 2;
+    b;
+    a == 2; /**bp:locals(1);stack()**/
+}
+
+a;/**bp:locals();**/
+WScript.Echo("PASSED");

+ 34 - 0
test/DebuggerCommon/blockScopeGlobalBlockTest.js.dbg.baseline

@@ -0,0 +1,34 @@
+[
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}"
+    },
+    "locals": {
+      "b": "number 2",
+      "a": "number 1",
+      "console": {
+        "#__proto__": "Object {...}",
+        "log": "function log"
+      }
+    },
+    "globals": {}
+  },
+  {
+    "callStack": [
+      {
+        "line": 10,
+        "column": 4,
+        "sourceText": "a == 2",
+        "function": "Global code"
+      }
+    ]
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "a": "number 1",
+      "console": "Object {...}"
+    }
+  }
+]

+ 11 - 0
test/DebuggerCommon/blockScopeGlobalDeadZoneTest.js

@@ -0,0 +1,11 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that let/const variables display properly when leaving a dead zone in the global case.
+var a = 0; /**bp:locals()**/
+let b = 1; /**bp:locals()**/
+const c = 2; /**bp:locals()**/
+a; /**bp:locals()**/
+WScript.Echo("PASSED");

+ 33 - 0
test/DebuggerCommon/blockScopeGlobalDeadZoneTest.js.dbg.baseline

@@ -0,0 +1,33 @@
+[
+  {
+    "this": "Object {...}",
+    "locals": {
+      "console": "Object {...}",
+      "a": "undefined undefined"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "console": "Object {...}",
+      "a": "number 0"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "b": "number 1",
+      "console": "Object {...}",
+      "a": "number 0"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "locals": {
+      "b": "number 1",
+      "c": "number 2",
+      "console": "Object {...}",
+      "a": "number 0"
+    }
+  }
+]

+ 30 - 0
test/DebuggerCommon/blockScopeGlobalSlotArrayTest.bug222631.js

@@ -0,0 +1,30 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that let/const variables declared at global scope
+// where one is in a slot array doesn't cause both to be placed
+// into a slot array slot (only 'a' should be).  This was causing
+// an assert in TrackSlotArrayPropertyForDebugger since the slot array
+// index for b was -1.
+// Bug #222631.
+
+try {
+    throw "level1";
+} catch(e) {	
+    eval(""); 	
+    with({  }) {
+        let a = "level2";
+        const b = "level2";
+        var c = function f() {  				
+            a += "level3";
+            /**bp:locals(1)**/
+        };
+        c();
+        a;
+        b;/**bp:locals(1)**/
+    }
+}
+
+WScript.Echo("PASSED");

+ 52 - 0
test/DebuggerCommon/blockScopeGlobalSlotArrayTest.bug222631.js.dbg.baseline

@@ -0,0 +1,52 @@
+[
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "c": "function <large string>"
+    },
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 0",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>"
+    },
+    "scopes0": {
+      "a": "string level2level3"
+    },
+    "scopes1": {
+      "e": "string level1"
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "c": "function <large string>"
+    }
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "c": "function <large string>"
+    },
+    "locals": {
+      "b": "string level2",
+      "a": "string level2level3",
+      "e": "string level1",
+      "console": {
+        "#__proto__": "Object {...}",
+        "log": "function log"
+      },
+      "c": {
+        "#__proto__": "function <large string>",
+        "prototype": "Object {...}",
+        "name": "string f",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 0"
+      }
+    },
+    "globals": {}
+  }
+]

+ 24 - 0
test/DebuggerCommon/blockScopeGlobalTest.js

@@ -0,0 +1,24 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that let/const variables appear properly as part of the global object.
+// (SimpleDictionaryTypeHandler)
+let gA = 1;
+const gConstB = 2;
+
+function blockScopeGlobalTestFunc() {
+    return 0;/**bp:locals(1);**/
+}
+blockScopeGlobalTestFunc();
+
+// Also test that global properties and global let/const variables appear properly when shadowing occurs.
+// (DictionaryTypeHandler)
+this.gC = 3;
+this.gD = 4;
+let gC = 5;
+const gD = 6;
+blockScopeGlobalTestFunc();
+
+WScript.Echo("PASSED");

+ 48 - 0
test/DebuggerCommon/blockScopeGlobalTest.js.dbg.baseline

@@ -0,0 +1,48 @@
+[
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "blockScopeGlobalTestFunc": "function <large string>"
+    },
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 0",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>"
+    },
+    "globals": {
+      "gA": "number 1",
+      "gConstB": "number 2",
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "blockScopeGlobalTestFunc": "function <large string>"
+    }
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "gC": "number 3",
+      "gD": "number 4",
+      "blockScopeGlobalTestFunc": "function <large string>"
+    },
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 0",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>"
+    },
+    "globals": {
+      "gA": "number 1",
+      "gConstB": "number 2",
+      "gC": "number 3",
+      "gD": "number 4",
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "blockScopeGlobalTestFunc": "function <large string>"
+    }
+  }
+]

+ 35 - 0
test/DebuggerCommon/blockScopeNestedFunctionTest.js

@@ -0,0 +1,35 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that let/const variables show properly in locals at
+// inside nested functions.
+function blockScopeNestedFunctionTestFunc() {
+    var x = -1; /**bp:locals()**/
+    let a = 0;
+    const aConst = 1;
+    a; /**bp:locals()**/
+    function innerFunc() {
+        /**bp:locals(1)**/
+        const bConst = 2;
+        let b = 3;
+        b; /**bp:locals(1)**/
+        function innerInnerFunc() {
+            /**bp:locals(1)**/
+            let c = 4;
+            const cConst = 5;
+            a;
+            aConst;
+            b;
+            bConst;
+            c; /**bp:locals(1)**/
+        }
+        innerInnerFunc();
+        return 0; /**bp:locals(1)**/
+    }
+    innerFunc(); 
+    return 0; /**bp:locals()**/
+}
+blockScopeNestedFunctionTestFunc();
+WScript.Echo("PASSED");

+ 199 - 0
test/DebuggerCommon/blockScopeNestedFunctionTest.js.dbg.baseline

@@ -0,0 +1,199 @@
+[
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "innerFunc": "function <large string>",
+      "x": "undefined undefined",
+      "a": "string [Uninitialized block variable]",
+      "aConst": "string [Uninitialized block variable]"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "innerFunc": "function <large string>",
+      "x": "number -1",
+      "a": "number 0",
+      "aConst": "number 1"
+    }
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "blockScopeNestedFunctionTestFunc": "function <large string>"
+    },
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 0",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>"
+    },
+    "locals": {
+      "innerInnerFunc": {
+        "#__proto__": "function function() {\n    [native code]\n}",
+        "prototype": "Object {...}",
+        "name": "string innerInnerFunc",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 0"
+      },
+      "bConst": "string [Uninitialized block variable]",
+      "b": "string [Uninitialized block variable]"
+    },
+    "scopes0": {
+      "a": "number 0",
+      "aConst": "number 1"
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "blockScopeNestedFunctionTestFunc": "function <large string>"
+    }
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "blockScopeNestedFunctionTestFunc": "function <large string>"
+    },
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 0",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>"
+    },
+    "locals": {
+      "innerInnerFunc": {
+        "#__proto__": "function function() {\n    [native code]\n}",
+        "prototype": "Object {...}",
+        "name": "string innerInnerFunc",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 0"
+      },
+      "bConst": "number 2",
+      "b": "number 3"
+    },
+    "scopes0": {
+      "a": "number 0",
+      "aConst": "number 1"
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "blockScopeNestedFunctionTestFunc": "function <large string>"
+    }
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "blockScopeNestedFunctionTestFunc": "function <large string>"
+    },
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 0",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>"
+    },
+    "locals": {
+      "c": "string [Uninitialized block variable]",
+      "cConst": "string [Uninitialized block variable]"
+    },
+    "scopes0": {
+      "bConst": "number 2",
+      "b": "number 3"
+    },
+    "scopes1": {
+      "a": "number 0",
+      "aConst": "number 1"
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "blockScopeNestedFunctionTestFunc": "function <large string>"
+    }
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "blockScopeNestedFunctionTestFunc": "function <large string>"
+    },
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 0",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>"
+    },
+    "locals": {
+      "c": "number 4",
+      "cConst": "number 5"
+    },
+    "scopes0": {
+      "bConst": "number 2",
+      "b": "number 3"
+    },
+    "scopes1": {
+      "a": "number 0",
+      "aConst": "number 1"
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "blockScopeNestedFunctionTestFunc": "function <large string>"
+    }
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "blockScopeNestedFunctionTestFunc": "function <large string>"
+    },
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 0",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>"
+    },
+    "locals": {
+      "innerInnerFunc": {
+        "#__proto__": "function function() {\n    [native code]\n}",
+        "prototype": "Object {...}",
+        "name": "string innerInnerFunc",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 0"
+      },
+      "bConst": "number 2",
+      "b": "number 3"
+    },
+    "scopes0": {
+      "a": "number 0",
+      "aConst": "number 1"
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "blockScopeNestedFunctionTestFunc": "function <large string>"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "innerFunc": "function <large string>",
+      "x": "number -1",
+      "a": "number 0",
+      "aConst": "number 1"
+    }
+  }
+]

+ 15 - 0
test/DebuggerCommon/blockScopeRegSlotDeadZoneTest.js

@@ -0,0 +1,15 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that let/const variables display properly when leaving a dead zone in the register slot case.
+function blockScopeRegSlotDeadZoneTest() {
+    var a = 0; /**bp:locals()**/
+    let b = 1; /**bp:locals()**/
+    const c = 2; /**bp:locals()**/
+    a; /**bp:locals()**/
+}
+
+blockScopeRegSlotDeadZoneTest();
+WScript.Echo("PASSED");

+ 38 - 0
test/DebuggerCommon/blockScopeRegSlotDeadZoneTest.js.dbg.baseline

@@ -0,0 +1,38 @@
+[
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "b": "string [Uninitialized block variable]",
+      "c": "string [Uninitialized block variable]",
+      "a": "undefined undefined"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "b": "string [Uninitialized block variable]",
+      "c": "string [Uninitialized block variable]",
+      "a": "number 0"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "b": "number 1",
+      "c": "string [Uninitialized block variable]",
+      "a": "number 0"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "b": "number 1",
+      "c": "number 2",
+      "a": "number 0"
+    }
+  }
+]

+ 29 - 0
test/DebuggerCommon/blockScopeRegSlotShadowingExpressionEvaluationTest.js

@@ -0,0 +1,29 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that let shadowing works for reg slot variables in the debugger evaluation.
+// Bug 209657.
+
+function Run() {
+    function verify() { }
+
+    function level1Func() {
+        let a = 'level1';      
+        a += 'level1';      
+        try {
+            throw 'level2';
+        } catch (e) {
+            let a = 'level2';          
+            a += 'level2';                 
+        }
+
+        /**bp:evaluate('a')**/ 
+    }
+
+    level1Func();
+}
+
+Run();
+WScript.Echo("PASSED");

+ 7 - 0
test/DebuggerCommon/blockScopeRegSlotShadowingExpressionEvaluationTest.js.dbg.baseline

@@ -0,0 +1,7 @@
+[
+  {
+    "evaluate": {
+      "a": "string level1level1"
+    }
+  }
+]

+ 115 - 0
test/DebuggerCommon/blockScopeSibling.bug263635.js

@@ -0,0 +1,115 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that sibling scopes are properly updating the debugger
+// scope index tracker when they are created (so they can be properly
+// updated during another bytecode generation pass).
+// Bug #263635.
+
+function baselineVerify(act, msg) { if(typeof WScript !== "undefined") { WScript.Echo(msg + ": " + act);} else { print(msg + ": " + act); } }
+function verify(act, exp, msg) { if(act !== exp) { if(typeof WScript !== "undefined") { WScript.Echo(msg + ": " + act + " = " + exp);} else { print(msg + ": " + act + " = " + exp); } } }
+var level_0_identifier_0 = "level0";
+let level_0_identifier_1= "level0";
+const level_0_identifier_2= "level0";
+
+function level1Func(level_1_identifier_0) {
+    
+    var level_1_identifier_1 = arguments;
+    
+    let level_1_identifier_2= "level1";
+const level_1_identifier_3= "level1";
+
+    
+    var level_1_identifier_4 = "level1";
+
+    
+    verify(level_0_identifier_0, "level0", "[Function Declaration with Args - With] level_0_identifier_0 at level 1");/**bp:evaluate('level_0_identifier_0==\'level0\'')**/;
+    
+    verify(level_0_identifier_1, "level0", "[Function Declaration with Args - With] level_0_identifier_1 at level 1");/**bp:evaluate('level_0_identifier_1==\'level0\'')**/;
+    
+    verify(level_0_identifier_2, "level0", "[Function Declaration with Args - With] level_0_identifier_2 at level 1");/**bp:evaluate('level_0_identifier_2==\'level0\'')**/;
+    
+    verify(level_1_identifier_0, "level1", "[Function Declaration with Args - With] level_1_identifier_0 at level 1");/**bp:evaluate('level_1_identifier_0==\'level1\'')**/;
+    
+    verify(arguments[0], "level1", "[Function Declaration with Args - With] arguments[0] at level 1");/**bp:evaluate('arguments[0]==\'level1\'')**/;
+    
+    verify(level_1_identifier_1[0], "level1", "[Function Declaration with Args - With] level_1_identifier_1 at level 1");/**bp:evaluate('level_1_identifier_1[0]==\'level1\'')**/;
+    
+    verify(level_1_identifier_2, "level1", "[Function Declaration with Args - With] level_1_identifier_2 at level 1");/**bp:evaluate('level_1_identifier_2==\'level1\'')**/;
+    
+    verify(level_1_identifier_3, "level1", "[Function Declaration with Args - With] level_1_identifier_3 at level 1");/**bp:evaluate('level_1_identifier_3==\'level1\'')**/;
+    
+    verify(level_1_identifier_4, "level1", "[Function Declaration with Args - With] level_1_identifier_4 at level 1");/**bp:evaluate('level_1_identifier_4==\'level1\'')**/;
+    
+
+    
+    arguments[0] += "level1";
+    level_1_identifier_1[0] += "level1";
+    level_1_identifier_2 += "level1";
+
+    with({ level_2_identifier_0: "level2" }) {
+        let level_2_identifier_1= "level2";
+const level_2_identifier_2= "level2";
+
+    
+    
+        verify(level_0_identifier_0, "level0", "[Function Declaration with Args - With] level_0_identifier_0 at level 2");/**bp:evaluate('level_0_identifier_0==\'level0\'')**/;
+    
+        verify(level_0_identifier_1, "level0", "[Function Declaration with Args - With] level_0_identifier_1 at level 2");/**bp:evaluate('level_0_identifier_1==\'level0\'')**/;
+    
+        verify(level_0_identifier_2, "level0", "[Function Declaration with Args - With] level_0_identifier_2 at level 2");/**bp:evaluate('level_0_identifier_2==\'level0\'')**/;
+    
+        verify(level_1_identifier_0, "level1level1level1", "[Function Declaration with Args - With] level_1_identifier_0 at level 2");/**bp:evaluate('level_1_identifier_0==\'level1level1level1\'')**/;
+    
+        verify(arguments[0], "level1level1level1", "[Function Declaration with Args - With] arguments[0] at level 2");/**bp:evaluate('arguments[0]==\'level1level1level1\'')**/;
+    
+        verify(level_1_identifier_1[0], "level1level1level1", "[Function Declaration with Args - With] level_1_identifier_1 at level 2");/**bp:evaluate('level_1_identifier_1[0]==\'level1level1level1\'')**/;
+    
+        verify(level_1_identifier_2, "level1level1", "[Function Declaration with Args - With] level_1_identifier_2 at level 2");/**bp:evaluate('level_1_identifier_2==\'level1level1\'')**/;
+    
+        verify(level_1_identifier_3, "level1", "[Function Declaration with Args - With] level_1_identifier_3 at level 2");/**bp:evaluate('level_1_identifier_3==\'level1\'')**/;
+    
+        verify(level_1_identifier_4, "level1", "[Function Declaration with Args - With] level_1_identifier_4 at level 2");/**bp:evaluate('level_1_identifier_4==\'level1\'')**/;
+    
+        verify(level_2_identifier_0, "level2", "[Function Declaration with Args - With] level_2_identifier_0 at level 2");/**bp:evaluate('level_2_identifier_0==\'level2\'')**/;
+    
+        verify(level_2_identifier_1, "level2", "[Function Declaration with Args - With] level_2_identifier_1 at level 2");/**bp:evaluate('level_2_identifier_1==\'level2\'')**/;
+    
+        verify(level_2_identifier_2, "level2", "[Function Declaration with Args - With] level_2_identifier_2 at level 2");/**bp:evaluate('level_2_identifier_2==\'level2\'')**/;
+    
+
+    
+        level_0_identifier_0 += "level2";
+        level_1_identifier_0 += "level2";
+        arguments[0] += "level2";
+        level_1_identifier_2 += "level2";
+        level_2_identifier_1 += "level2";
+
+    
+    
+        verify(level_2_identifier_0, "level2", "[Function Declaration with Args - With] level_2_identifier_0 after assignment at level 2");/**bp:evaluate('level_2_identifier_0==\'level2\'')**/; 
+        verify(level_2_identifier_1, "level2level2", "[Function Declaration with Args - With] level_2_identifier_1 after assignment at level 2");/**bp:evaluate('level_2_identifier_1==\'level2level2\'')**/; 
+        verify(level_2_identifier_2, "level2", "[Function Declaration with Args - With] level_2_identifier_2 after assignment at level 2");/**bp:evaluate('level_2_identifier_2==\'level2\'')**/; 
+
+    }
+
+    
+    verify(level_1_identifier_0, "level1level1level1level2level2", "[Function Declaration with Args - With] level_1_identifier_0 after assignment at level 1");/**bp:evaluate('level_1_identifier_0==\'level1level1level1level2level2\'')**/; 
+    verify(arguments[0], "level1level1level1level2level2", "[Function Declaration with Args - With] arguments[0] after assignment at level 1");/**bp:evaluate('arguments[0]==\'level1level1level1level2level2\'')**/; 
+    verify(level_1_identifier_1[0], "level1level1level1level2level2", "[Function Declaration with Args - With] level_1_identifier_1[0] after assignment at level 1");/**bp:evaluate('level_1_identifier_1[0]==\'level1level1level1level2level2\'')**/; 
+    verify(level_1_identifier_2, "level1level1level2", "[Function Declaration with Args - With] level_1_identifier_2 after assignment at level 1");/**bp:evaluate('level_1_identifier_2==\'level1level1level2\'')**/; 
+    verify(level_1_identifier_3, "level1", "[Function Declaration with Args - With] level_1_identifier_3 after assignment at level 1");/**bp:evaluate('level_1_identifier_3==\'level1\'')**/; 
+    verify(level_1_identifier_4, "level1", "[Function Declaration with Args - With] level_1_identifier_4 after assignment at level 1");/**bp:evaluate('level_1_identifier_4==\'level1\'')**/; 
+
+}
+level1Func("level1");
+level1Func = undefined;
+
+
+verify(level_0_identifier_0, "level0level2", "[Function Declaration with Args - With] level_0_identifier_0 after assignment at level 0");/**bp:evaluate('level_0_identifier_0==\'level0level2\'')**/; 
+verify(level_0_identifier_1, "level0", "[Function Declaration with Args - With] level_0_identifier_1 after assignment at level 0");/**bp:evaluate('level_0_identifier_1==\'level0\'')**/; 
+verify(level_0_identifier_2, "level0", "[Function Declaration with Args - With] level_0_identifier_2 after assignment at level 0");/**bp:evaluate('level_0_identifier_2==\'level0\'')**/; 
+
+WScript.Echo("PASSED");

+ 167 - 0
test/DebuggerCommon/blockScopeSibling.bug263635.js.dbg.baseline

@@ -0,0 +1,167 @@
+[
+  {
+    "evaluate": {
+      "level_0_identifier_0=='level0'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_0_identifier_1=='level0'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_0_identifier_2=='level0'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_0=='level1'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "arguments[0]=='level1'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_1[0]=='level1'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_2=='level1'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_3=='level1'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_4=='level1'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_0_identifier_0=='level0'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_0_identifier_1=='level0'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_0_identifier_2=='level0'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_0=='level1level1level1'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "arguments[0]=='level1level1level1'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_1[0]=='level1level1level1'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_2=='level1level1'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_3=='level1'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_4=='level1'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_2_identifier_0=='level2'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_2_identifier_1=='level2'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_2_identifier_2=='level2'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_2_identifier_0=='level2'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_2_identifier_1=='level2level2'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_2_identifier_2=='level2'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_0=='level1level1level1level2level2'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "arguments[0]=='level1level1level1level2level2'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_1[0]=='level1level1level1level2level2'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_2=='level1level1level2'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_3=='level1'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_4=='level1'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_0_identifier_0=='level0level2'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_0_identifier_1=='level0'": "boolean true"
+    }
+  },
+  {
+    "evaluate": {
+      "level_0_identifier_2=='level0'": "boolean true"
+    }
+  }
+]

+ 32 - 0
test/DebuggerCommon/blockScopeSiblingScopeTrackedInNonDebugMode.bug321751.js

@@ -0,0 +1,32 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// This tests that sibling scopes are tracked when in non-debug mode
+// and properly reset during reparse and bytecode regeneration.
+// Bug #321751
+
+function Run() {
+    // Slot array scope
+    {
+        let a = 0;          // Slot array
+        function inner() {  // Register slot
+            a++;
+        }
+        inner();
+    }
+
+    // Slot array scope
+    {
+        let c = 2;          // Slot array
+        function inner2() { // Register slot
+            c++;
+        }
+        inner2();
+    }
+};
+Run();
+
+WScript.Attach(function(){Run();});
+WScript.Echo("PASSED");

+ 1 - 0
test/DebuggerCommon/blockScopeSiblingScopeTrackedInNonDebugMode.bug321751.js.dbg.baseline

@@ -0,0 +1 @@
+[]

+ 52 - 0
test/DebuggerCommon/blockScopeSlotArrayCapture.js

@@ -0,0 +1,52 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+function verify(){}
+function Run(){
+    function verify(act, exp, msg) { }
+    var level_0_identifier_0 = "level0";
+    
+    // upper scope - that is closed over in level2func
+    {
+        let level_1_identifier_0= "level1_0";  /* captured */
+        const level_1_identifier_1= "level1_1";   /* not captured by nested function */
+        let level_1_identifier_2; /**bp:locals(1); evaluate('level_0_identifier_0'); evaluate('level_1_identifier_0')**/  /* not initialized & captured */ 
+        
+		function level2Func(level_2_identifier_0) {
+            var level_2_identifier_1 = "level2";  
+            verify(level_1_identifier_0, "level1level1", "[Let Const - Function Declaration] level_1_identifier_0 at level 2"); 
+            level_1_identifier_2; /**bp:locals(1);evaluate('level_1_identifier_0'); evaluate('level_2_identifier_1')**/ 
+        }
+        level2Func("level2");
+        level2Func = undefined;
+        level_1_identifier_2 = "test";
+    }
+}
+Run.apply({});
+
+
+function Run1(){
+    var level_0_identifier_0 = "level0";
+    let level_0_identifier_1= "level0";
+    const level_0_identifier_2= "level0";
+
+    {
+        let level_0_identifier_0= "level1";
+        let level_0_identifier_1= "level1";
+        let level_0_identifier_2= "level1";
+
+        var level2Func = function level_2_identifier_0(level_2_identifier_1) {
+            var level_2_identifier_2 = arguments;
+            let level_2_identifier_3= "level2";
+            const level_2_identifier_4= "level2";
+            var level_2_identifier_5 = "level2";
+            var _____dummyvar________ = 1;/**bp:evaluate('level_2_identifier_3')**/;
+            level_0_identifier_2 += "level2";         
+    };
+    level2Func("level2");
+    }
+}
+Run1.apply({});
+WScript.Echo("PASSED");

+ 101 - 0
test/DebuggerCommon/blockScopeSlotArrayCapture.js.dbg.baseline

@@ -0,0 +1,101 @@
+[
+  {
+    "this": {},
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 0",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>"
+    },
+    "locals": {
+      "level2Func": {
+        "#__proto__": "function function() {\n    [native code]\n}",
+        "prototype": "Object {...}",
+        "name": "string level2Func",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 1"
+      },
+      "level_1_identifier_1": "string level1_1",
+      "level_1_identifier_0": "string level1_0",
+      "level_1_identifier_2": "string [Uninitialized block variable]",
+      "level_0_identifier_0": "string level0",
+      "verify": {
+        "#__proto__": "function function() {\n    [native code]\n}",
+        "prototype": "Object {...}",
+        "name": "string verify",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 3"
+      }
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "verify": "function function verify(){}",
+      "Run": "function <large string>",
+      "Run1": "function <large string>"
+    }
+  },
+  {
+    "evaluate": {
+      "level_0_identifier_0": "string level0"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_0": "string level1_0"
+    }
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "verify": "function function verify(){}",
+      "Run": "function <large string>",
+      "Run1": "function <large string>"
+    },
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 1",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>",
+      "[0]": "string level2"
+    },
+    "locals": {
+      "level_2_identifier_0": "string level2",
+      "level_2_identifier_1": "string level2"
+    },
+    "scopes0": {
+      "level_1_identifier_0": "string level1_0",
+      "level_1_identifier_2": "undefined undefined"
+    },
+    "scopes1": {
+      "verify": "function <large string>"
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "verify": "function function verify(){}",
+      "Run": "function <large string>",
+      "Run1": "function <large string>"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_0": "string level1_0"
+    }
+  },
+  {
+    "evaluate": {
+      "level_2_identifier_1": "string level2"
+    }
+  },
+  {
+    "evaluate": {
+      "level_2_identifier_3": "string level2"
+    }
+  }
+]

+ 57 - 0
test/DebuggerCommon/blockScopeSlotArrayCaptureAttach.js

@@ -0,0 +1,57 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+function verify(){}
+function Run(){
+    function verify(act, exp, msg) { }
+    var level_0_identifier_0 = "level0";
+    
+    // upper scope - that is closed over in level2func
+    {
+        let level_1_identifier_0= "level1_0";  /* captured */
+        const level_1_identifier_1= "level1_1";   /* not captured by nested function */
+        let level_1_identifier_2; /**bp:locals(1); evaluate('level_0_identifier_0'); evaluate('level_1_identifier_0')**/  /* not initialized & captured */ 
+        
+		function level2Func(level_2_identifier_0) {
+            var level_2_identifier_1 = "level2";  
+            verify(level_1_identifier_0, "level1level1", "[Let Const - Function Declaration] level_1_identifier_0 at level 2"); 
+            level_1_identifier_2; /**bp:locals(1);evaluate('level_1_identifier_0'); evaluate('level_2_identifier_1')**/ 
+        }
+        level2Func("level2");
+        level2Func = undefined;
+        level_1_identifier_2 = "test";
+    }
+}
+Run.apply({});
+
+
+function Run1(){
+    var level_0_identifier_0 = "level0";
+    let level_0_identifier_1= "level0";
+    const level_0_identifier_2= "level0";
+
+    {
+        let level_0_identifier_0= "level1";
+        let level_0_identifier_1= "level1";
+        let level_0_identifier_2= "level1";
+
+        var level2Func = function level_2_identifier_0(level_2_identifier_1) {
+            var level_2_identifier_2 = arguments;
+            let level_2_identifier_3= "level2";
+            const level_2_identifier_4= "level2";
+            var level_2_identifier_5 = "level2";
+            var _____dummyvar________ = 1;/**bp:evaluate('level_2_identifier_3')**/;
+            level_0_identifier_2 += "level2";         
+    };
+    level2Func("level2");
+    }
+}
+Run1.apply({});
+WScript.Attach(function () {
+    Run();
+    Run1();
+});
+
+WScript.Echo("PASSED");

+ 107 - 0
test/DebuggerCommon/blockScopeSlotArrayCaptureAttach.js.dbg.baseline

@@ -0,0 +1,107 @@
+[
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "verify": "function function verify(){}",
+      "Run": "function <large string>",
+      "Run1": "function <large string>"
+    },
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 0",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>"
+    },
+    "locals": {
+      "level2Func": {
+        "#__proto__": "function function() {\n    [native code]\n}",
+        "prototype": "Object {...}",
+        "name": "string level2Func",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 1"
+      },
+      "level_1_identifier_1": "string level1_1",
+      "level_1_identifier_0": "string level1_0",
+      "level_1_identifier_2": "string [Uninitialized block variable]",
+      "level_0_identifier_0": "string level0",
+      "verify": {
+        "#__proto__": "function function() {\n    [native code]\n}",
+        "prototype": "Object {...}",
+        "name": "string verify",
+        "caller": "object null",
+        "arguments": "object null",
+        "length": "number 3"
+      }
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "verify": "function function verify(){}",
+      "Run": "function <large string>",
+      "Run1": "function <large string>"
+    }
+  },
+  {
+    "evaluate": {
+      "level_0_identifier_0": "string level0"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_0": "string level1_0"
+    }
+  },
+  {
+    "this": {
+      "telemetryLog": "function <large string>",
+      "console": "Object {...}",
+      "verify": "function function verify(){}",
+      "Run": "function <large string>",
+      "Run1": "function <large string>"
+    },
+    "arguments": {
+      "#__proto__": "Object {...}",
+      "length": "number 1",
+      "callee": "function <large string>",
+      "Symbol.iterator": "function <large string>",
+      "[0]": "string level2"
+    },
+    "locals": {
+      "level_2_identifier_0": "string level2",
+      "level_2_identifier_1": "string level2"
+    },
+    "scopes0": {
+      "level_1_identifier_0": "string level1_0",
+      "level_1_identifier_2": "undefined undefined"
+    },
+    "scopes1": {
+      "verify": "function <large string>"
+    },
+    "globals": {
+      "WScript": "Object {...}",
+      "print": "function print",
+      "console": "Object {...}",
+      "verify": "function function verify(){}",
+      "Run": "function <large string>",
+      "Run1": "function <large string>"
+    }
+  },
+  {
+    "evaluate": {
+      "level_1_identifier_0": "string level1_0"
+    }
+  },
+  {
+    "evaluate": {
+      "level_2_identifier_1": "string level2"
+    }
+  },
+  {
+    "evaluate": {
+      "level_2_identifier_3": "string level2"
+    }
+  }
+]

+ 20 - 0
test/DebuggerCommon/blockScopeSlotArrayDeadZoneTest.js

@@ -0,0 +1,20 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Tests that let/const variables display properly when leaving a dead zone in the slot array case.
+function blockScopeSlotArrayDeadZoneTest() {
+    var a = 0; /**bp:locals()**/
+    let b = 1; /**bp:locals()**/
+    const c = 2; /**bp:locals()**/
+    a; /**bp:locals()**/
+    function inner() {
+        b;
+        c; /**bp:locals()**/
+    }
+    inner();
+}
+
+blockScopeSlotArrayDeadZoneTest();
+WScript.Echo("PASSED");

+ 47 - 0
test/DebuggerCommon/blockScopeSlotArrayDeadZoneTest.js.dbg.baseline

@@ -0,0 +1,47 @@
+[
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "inner": "function <large string>",
+      "a": "undefined undefined",
+      "b": "string [Uninitialized block variable]",
+      "c": "string [Uninitialized block variable]"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "inner": "function <large string>",
+      "a": "number 0",
+      "b": "string [Uninitialized block variable]",
+      "c": "string [Uninitialized block variable]"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "inner": "function <large string>",
+      "a": "number 0",
+      "b": "number 1",
+      "c": "string [Uninitialized block variable]"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "locals": {
+      "inner": "function <large string>",
+      "a": "number 0",
+      "b": "number 1",
+      "c": "number 2"
+    }
+  },
+  {
+    "this": "Object {...}",
+    "arguments": "Object {...}",
+    "scopes0": "undefined undefined"
+  }
+]

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů