Microsoft KB Archive/252895

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Knowledge Base


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.

REFERENCES

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