
Script Debugger to debug wsh scripts
Hello Michael,
thanks for your reply. As I read it, it comes back to my memory - attach running documents (I have the Visual Studio Debuger too - in my original posting, I wrote about the VI de{*filter*} accidentally), but it don't display "script block"s, but my component does it work!!!!!!!!! So, I thought somewhat must hacked my registry.
If I install Office, I normally install really each bit of it [ :-) , ok, some bitmaps not]. I'll see how to use your tips.
Many thanks,
Manfred
Manfred,
I haven't used the (IE) Script De{*filter*} 1.0x for quite a while. I have VStudio 6.0 on my Win98 box and MSE (installed from FrontPage 2000) at work, so they have installed themselves as the script de{*filter*}. With the VStudio de{*filter*}, as long as I have
<?component error="false" debug="true" ?>
in the component, I can single step from a WSH script right into the WSC code.
As soon as an instance of the WSC exists, I can view "running documents" and the WSC instance shows up as "VBScript - script block" in the running documents window, but none of this works if the debug attribute on the component PI isn't set to true.
I would guess that debugging with MSE is comparable.
If you've got *any* Office 2000 products installed (all I have at work so far is FP2000), install the "Web Scripting" option which is really the Microsoft Script Editor (mse.exe). It's a stripped down (not by much) version of the VStudio IDE and is a MUCH better de{*filter*}, plus with a little registry hack, you get IntelliSense for .wsf files and also for .vbs and .js if you put a commented <script language="..." > tag at the top.
--
Michael Harris
MVP - Windows Script
Hello Michael,
I asked some days ago in the "scriptlets" group about debugging components (wsc). Could you please give me a tip??? All my de{*filter*}s step over instead of step into my component. Debugging the vbs/wsf file works as expected.
A tip would be a great thing!! Are there more registry keys for WSC's ???
Thanks and best regards,
Manfred Braun
(Private)
Lange Roetterstrasse 7
D68167 Mannheim
Germany
(Remove the anti-spam-underscore to mail me!)
What version of WSH?
(assuming you have the Script De{*filter*} installed)
In WSH 1.0, just add a "stop" statement where you want to break into the de{*filter*}, then set breakpoints, single step, etc...
In WSH 2.0, set HKCU\Software\Microsoft\Windows Script\Settings\JITDebug to 1 (DWORD value). Then start your script with "wscript_//d yourscript.vbs <arguments>" (the _ is a space) to allow the "stop" statement to be honored. Or use the syntax "wscript_//x yourscript.vbs <arguments>" to start the script in the de{*filter*} (no stop statement needed).
--
Michael Harris
MVP - Windows Script
I have an editor that has the color coding for VBScript that works
pretty well. What I was wondering was if there was a way
to DEBUG the script without having to use the VB de{*filter*}
but perhaps the Script De{*filter*} !?!
Thanks in advance!