
Stop Statment not entering debugger in WSH/Win2000
If you have WSH 1.0, you can use stop (VBScript) or debug (JScript).
In WSH 2.0 you have to launch the script using either / /X or / /D to launch
a script in De{*filter*} mode. Note that I have added a blank between the //
to avoid the OE autoconversion to file://. If you use .wsf files there is a
need
to set the debug attribute to false within the script.
And there is a problem in WSH 2.0 that causes that the JITDebugging flag
within the registry isn't set in all cases (that prevents debugging at all).
The last pitfall: If somebody installed accidentially the wrong de{*filter*}
(the
NT version) for IE 5 in Win 9x, the mdm.exe and a 2nd file are wrong.
Microsoft's
download website for the de{*filter*} comes with details how to fix this
problem.
Newsletter #4 in my WSH Bazaar discusses the other debugging topics
mentioned
above.
G. Born
Check out the WSH Bazaar at:
www.borncity.de
WSH Bazaar addresses this issues.
Quote:
>I just got it to work using cscript.exe and the file://D command line
option. I
>saw it in a previous post as file://D but wasn't able to get it to go using
>that. It turned out that the poster must have been using Outlook Express
>(as I am) so it automatically converts 2 slashes and a capital D to
file://D
>. I didn't have to use this command line switch in NT4 so I'm not sure why
>win2k is different.
>-Ted
>The STOP keyword is apparently recognized, but has no functionality. From
>the VBS documentation
>Visual Basic for Applications Features not in VBScript
>Debugging
>Debug.Print, End, Stop
>--
>Regards,
>Doug Knox, Microsoft MVPDTS
>No support provided by e-mail! Reply to the newsgroups only!
>* Help us help YOU - http://www.*-*-*.com/
>--
>The Microsoft MVP Program does not constitute employment or contractual
>obligation with Microsoft Corporation. We do this for fun! :)
>--
>Visit my web site for Win95/98 Tweaks, Tips and Utilities
> http://www.*-*-*.com/
>> Both cscript.exe and wscript.exe appear to be ignoring the Stop statement
>in
>> any VBScript file that I create. If I change the extension to .htm and
>put
>> <SCRIPT> </SCRIPT> tags around my script, the de{*filter*} is invoked fine,
>but
>> this does not work for all purposes.
>> sample code of what I have tried is very simple:
>> ' code block begins
>> stop
>> msgbox "you should have stopped by now"
>> ' code block ends
>> I have installed the de{*filter*} and have also set the dword reg key
>> HKCU\Software\microsoft\windows script\settings\JITDebug to 1, but this
>has
>> not fixed it. Any suggestions?
>> Thanks,
>> -Ted