Microsoft KB Archive/252895

= PRB: VBScript 'Stop' Statement Does Not Start Script Debugger =

Article ID: 252895

Article Last Modified on 10/15/2002

-

APPLIES TO


 * Microsoft Visual Basic, Scripting Edition 5.0

-



This article was previously published under Q252895



SYMPTOMS
When using Microsoft Visual Basic Script's STOP statement to halt and display script in the Microsoft Script Debugger or Microsoft Visual InterDev 6.0, the STOP statement might fail to work.



CAUSE
This problem is caused by a modification to VBScript. In versions 5.0 and earlier, the STOP statement launches the script debugger. However, occasionally scripts running unattended on servers could also bring up the script debugger when encountering a STOP statement and then appear to hang. In order to alleviate this problem, a Registry key has been added that indicates whether the user wishes the debugger to be launched. This key is turned off by default in version 5.1 of the script engines.



RESOLUTION
In order to re-enable the STOP statement, users can manually set the Registry key to indicate that they want the script debugger to be launched when a STOP statement is encountered. The Registry key is: HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings Inside this key is a value called JITDebug. Set the value of this key to 1 to re-enable the STOP statement. Note that if you are using WScript, you need to add the /d command line option to enable debugging.



STATUS
This behavior is by design.

