JsDebuggerAttachDetach.js 605 B

123456789101112131415
  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. function foo() {
  6. var x = 1; /**bp:dumpSourceList();**/
  7. WScript.Echo("foo");
  8. }
  9. // Attach twice, detach twice
  10. WScript.Attach(foo);
  11. WScript.Attach(foo);
  12. WScript.Detach(foo);
  13. WScript.Detach(foo);
  14. WScript.Echo("Pass");