JsDiagRequestAsyncBreak.js 632 B

123456789101112131415161718192021
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. /**onasyncbreak:evaluate('count');enableBp('A');**/
  6. var count = 0;
  7. while (count++ < 5) {
  8. if (count == 3) {
  9. WScript.RequestAsyncBreak();
  10. }
  11. }
  12. function foo() {
  13. var x = 1;
  14. x = 2; /**loc(A):stack();**/
  15. }
  16. foo();
  17. WScript.Echo("pass");