Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/252895

From BetaArchive Wiki
Knowledge Base

Article ID: 252895

Article Last Modified on 10/15/2002


  • Microsoft Visual Basic, Scripting Edition 5.0

This article was previously published under Q252895


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.


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.


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.


This behavior is by design.


For additional information about handling run-time errors in a script host, please click the article number below to view the article in the Microsoft Knowledge Base:

232394 HOWTO: Catch Run-time Errors in an ActiveX Script Host

Keywords: kbbug kbdebug kbprb KB252895