Script Debugger to debug wsh scripts 
Author Message
 Script Debugger to debug wsh scripts

It appears that the script de{*filter*} can be used to debug asp and
client side scripts but can it be used to debug regular windows
host scripts written in VBScript.

If not, what is the suggest way to debug these scripts.

Thanks in advance!



Sun, 28 Jul 2002 03:00:00 GMT  
 Script Debugger to debug wsh scripts

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!


  I would suppose if you just type them in then the script de{*filter*} will do
  standard work on the VBScript, scripting for the wsh and for IE arent that
  different, the biggest difference is the goals being attempted. There are
  plenty of programs out there for writing your scripts in.

  check sapien.com for primalscript ($99), apparently its very good. I use
  notepad for writing mine it is always cheerful.

  I have been thinking about making a vbscript writer program purely from a
  webpage for a while, so attached is the most basic kind of thing you could
  find, it handles if, then, for, next, do and so on. Its not good but
  sometimes it shows you silly mistakes that you otherwise might miss. (N>B i
  havent cracked elseif, if you start using it the script checking does
  understand)

  Dominic Marks



Sun, 28 Jul 2002 03:00:00 GMT  
 Script Debugger to debug wsh scripts

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!


    I would suppose if you just type them in then the script de{*filter*} will do
    standard work on the VBScript, scripting for the wsh and for IE arent that
    different, the biggest difference is the goals being attempted. There are
    plenty of programs out there for writing your scripts in.

    check sapien.com for primalscript ($99), apparently its very good. I use
    notepad for writing mine it is always cheerful.

    I have been thinking about making a vbscript writer program purely from a
    webpage for a while, so attached is the most basic kind of thing you could
    find, it handles if, then, for, next, do and so on. Its not good but
    sometimes it shows you silly mistakes that you otherwise might miss. (N>B i
    havent cracked elseif, if you start using it the script checking does
    understand)

    Dominic Marks



Sun, 28 Jul 2002 03:00:00 GMT  
 Script Debugger to debug wsh scripts

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!



Sun, 28 Jul 2002 03:00:00 GMT  
 Script Debugger to debug wsh scripts

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!



Sun, 28 Jul 2002 03:00:00 GMT  
 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!



Mon, 29 Jul 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Cannot Start debugging .vbs-Script in MS Script Debugger

2. debugging a WSH-script with microsoft script editor doesn't work

3. Debugging -Starting Microsoft Script Debugger

4. debugging ASP VBScript with Microsoft Script debugger?

5. Cannot get the MS Script Debugger to debug in XP

6. Can't debug PerlScript with the Script Debugger anymore

7. debugging ASP VBScript with Microsoft Script debugger?

8. Trouble debugging with MS Script Debugger in XP

9. How to run WSH script under debugger?

10. WSH 5.6 and Script Debugger on XP Pro problems

11. Any friendly debugger for WSH scripts?

12. Debugging WSH Scripts

 

 
Powered by phpBB® Forum Software