Debugging WSF files 
Author Message
 Debugging WSF files

Does anyone know how to start the Microsoft Script De{*filter*} on a WSF file?

Thanks,
Chris Wood



Sat, 14 Sep 2002 03:00:00 GMT  
 Debugging WSF files
To enable debugging in general for WSH hosted scripts (and also WSCs), set the registry key

HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings

named value JITDebug = 1 (DWORD)

You may need to add both the Settings key and the JITDebug if they aren't there already.  

Note that the

...\Windows Script Host\...
...\Windows Scripting Host\...

are obsolete (used by WSH 1.0 and the 2.0 betas).

Once the JITDebug value is set to 1 (note: the _ is a space to avoid wscript file://x)

To start in the de{*filter*}:

wscript.exe_//x myscript.wsf

To enable the stop statement (de{*filter*} in jscript):

wscript.exe_//d myscript.wsf

If you use strict xml syntax you need the <?job...?> processing instruction (PI).

<?xml version="1.0"?>
<job>
<?job error="yes" debug="yes"?>
<script language="VBScript">
<![CDATA[
stop
msgbox "hello"
]]>
</script>
</job>

If not strict xml, then the <?job...?> PI isn't required but still works.

<job>
<script language="vbscript">
stop
msgbox "hello"
</script>
</job>

--
Michael Harris
MVP Scripting

Does anyone know how to start the Microsoft Script De{*filter*} on a WSF file?

Thanks,
Chris Wood



Sat, 14 Sep 2002 03:00:00 GMT  
 Debugging WSF files
Have a look at the Newsletter 4 in WSH Bazaar. There are a few
suggestions about debugging in WSH 2.0 and with .WSF files.

G. Born

Check out the WSH Bazaar at:

www.borncity.de

Chris Wood schrieb in Nachricht

Quote:
>Does anyone know how to start the Microsoft Script De{*filter*} on a WSF file?

>Thanks,
>Chris Wood



Sun, 15 Sep 2002 03:00:00 GMT  
 Debugging WSF files


[snip]

Quote:
> Note that the

> ...\Windows Script Host\...
> ...\Windows Scripting Host\...

> are obsolete (used by WSH 1.0 and the 2.0 betas).

[snip]

The "Windows Script Host" key still contains our settings data, so don't
delete it. The JITDebug key is actually used by the engines, and not WSH, so
it goes under the "Windows Script" key.

The "Windows Scripting Host" key is obsolete - we changed the word
"Scripting" to "Script" for the Windows Script V5.0 on all of our products.

Mike Whalen
Windows Script Dev



Sun, 15 Sep 2002 03:00:00 GMT  
 Debugging WSF files
Ooops...  Sorry Mike.  But the ...\Windows Scripting Host\... branch is dead, isn't it?

--
Michael Harris
MVP Scripting




[snip]

Quote:
> Note that the

> ...\Windows Script Host\...
> ...\Windows Scripting Host\...

> are obsolete (used by WSH 1.0 and the 2.0 betas).

[snip]

The "Windows Script Host" key still contains our settings data, so don't
delete it. The JITDebug key is actually used by the engines, and not WSH, so
it goes under the "Windows Script" key.

The "Windows Scripting Host" key is obsolete - we changed the word
"Scripting" to "Script" for the Windows Script V5.0 on all of our products.

Mike Whalen
Windows Script Dev



Sun, 15 Sep 2002 03:00:00 GMT  
 Debugging WSF files
Yes - "Windows Scripting Host" is a dead branch that can safely be whacked.

Note - there is still something in Win2K which, for some reason, is
installing a "Windows Scripting Host" key under HKLM.  It won't cause any
actual harm (besides being chaf in the registry), but it doesn't do anything
useful, either. It appears to be trying to set the file associations for
JScript and VBScript. It doesn't come from us (the scripting team), and I
haven't found the culprit yet, as it's not exactly a high priority, but it
is there.

Mike Whalen
Windows Script Dev


Quote:
> Ooops...  Sorry Mike.  But the ...\Windows Scripting Host\... branch is
dead, isn't it?

> --
> Michael Harris
> MVP Scripting





> [snip]
> > Note that the

> > ...\Windows Script Host\...
> > ...\Windows Scripting Host\...

> > are obsolete (used by WSH 1.0 and the 2.0 betas).

> [snip]

> The "Windows Script Host" key still contains our settings data, so don't
> delete it. The JITDebug key is actually used by the engines, and not WSH,
so
> it goes under the "Windows Script" key.

> The "Windows Scripting Host" key is obsolete - we changed the word
> "Scripting" to "Script" for the Windows Script V5.0 on all of our
products.

> Mike Whalen
> Windows Script Dev



Sun, 15 Sep 2002 03:00:00 GMT  
 Debugging WSF files
"...(besides being chaf in the registry)..."

As if there isn't enough already ;-)...

--
Michael Harris
MVP Scripting


Yes - "Windows Scripting Host" is a dead branch that can safely be whacked.

Note - there is still something in Win2K which, for some reason, is
installing a "Windows Scripting Host" key under HKLM.  It won't cause any
actual harm (besides being chaf in the registry), but it doesn't do anything
useful, either. It appears to be trying to set the file associations for
JScript and VBScript. It doesn't come from us (the scripting team), and I
haven't found the culprit yet, as it's not exactly a high priority, but it
is there.

Mike Whalen
Windows Script Dev


Quote:
> Ooops...  Sorry Mike.  But the ...\Windows Scripting Host\... branch is
dead, isn't it?

> --
> Michael Harris
> MVP Scripting





> [snip]
> > Note that the

> > ...\Windows Script Host\...
> > ...\Windows Scripting Host\...

> > are obsolete (used by WSH 1.0 and the 2.0 betas).

> [snip]

> The "Windows Script Host" key still contains our settings data, so don't
> delete it. The JITDebug key is actually used by the engines, and not WSH,
so
> it goes under the "Windows Script" key.

> The "Windows Scripting Host" key is obsolete - we changed the word
> "Scripting" to "Script" for the Windows Script V5.0 on all of our
products.

> Mike Whalen
> Windows Script Dev



Sun, 15 Sep 2002 03:00:00 GMT  
 Debugging WSF files
Good info, thanks...

Now, I've got it working from a command prompt.  But is there any way
to get the de{*filter*} to work via file association?  I've
tried "C:\WINNT\System32\WScript.exe "%1" %* //d" and "C:\WINNT\System32
\WScript.exe //d "%1" %*" to no avail.

Jim



Quote:
> To enable debugging in general for WSH hosted scripts (and also

WSCs), set the registry key
Quote:

> HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings

> named value JITDebug = 1 (DWORD)

> You may need to add both the Settings key and the JITDebug if they

aren't there already.
Quote:

> Note that the

> ...\Windows Script Host\...
> ...\Windows Scripting Host\...

> are obsolete (used by WSH 1.0 and the 2.0 betas).

> Once the JITDebug value is set to 1 (note: the _ is a space to avoid
wscript file://x)

> To start in the de{*filter*}:

> wscript.exe_//x myscript.wsf

> To enable the stop statement (de{*filter*} in jscript):

> wscript.exe_//d myscript.wsf

> If you use strict xml syntax you need the <?job...?> processing
instruction (PI).

> <?xml version="1.0"?>
> <job>
> <?job error="yes" debug="yes"?>
> <script language="vbscript">
> <![CDATA[
> stop
> msgbox "hello"
> ]]>
> </script>
> </job>

> If not strict xml, then the <?job...?> PI isn't required but still
works.

> <job>
> <script language="vbscript">
> stop
> msgbox "hello"
> </script>
> </job>

> --
> Michael Harris
> MVP Scripting




Quote:
> Does anyone know how to start the Microsoft Script De{*filter*} on a WSF
file?

> Thanks,
> Chris Wood

--
Jim
Please CC: by email

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Fri, 27 Sep 2002 03:00:00 GMT  
 Debugging WSF files
I just added a "Start in debug" context menu command for .wsf files with a command line of

C:\WINNT\System32\WScript.exe_//x "%1" %*  (where the _ is actually a space)

and it works fine.

You may need to include

<?job error="true" debug="true" ?>

The _//d switch just allows the stop statement (de{*filter*} in jscript) to work.  

--
Michael Harris
MVP Scripting

Good info, thanks...

Now, I've got it working from a command prompt.  But is there any way
to get the de{*filter*} to work via file association?  I've
tried "C:\WINNT\System32\WScript.exe "%1" %* file://d" and "C:\WINNT\System32
\WScript.exe file://d "%1" %*" to no avail.

Jim



Quote:
> To enable debugging in general for WSH hosted scripts (and also

WSCs), set the registry key
Quote:

> HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings

> named value JITDebug = 1 (DWORD)

> You may need to add both the Settings key and the JITDebug if they

aren't there already.
Quote:

> Note that the

> ...\Windows Script Host\...
> ...\Windows Scripting Host\...

> are obsolete (used by WSH 1.0 and the 2.0 betas).

> Once the JITDebug value is set to 1 (note: the _ is a space to avoid
wscript file://x)

> To start in the de{*filter*}:

> wscript.exe_//x myscript.wsf

> To enable the stop statement (de{*filter*} in jscript):

> wscript.exe_//d myscript.wsf

> If you use strict xml syntax you need the <?job...?> processing
instruction (PI).

> <?xml version="1.0"?>
> <job>
> <?job error="yes" debug="yes"?>
> <script language="vbscript">
> <![CDATA[
> stop
> msgbox "hello"
> ]]>
> </script>
> </job>

> If not strict xml, then the <?job...?> PI isn't required but still
works.

> <job>
> <script language="vbscript">
> stop
> msgbox "hello"
> </script>
> </job>

> --
> Michael Harris
> MVP Scripting




Quote:
> Does anyone know how to start the Microsoft Script De{*filter*} on a WSF
file?

> Thanks,
> Chris Wood

--
Jim
Please CC: by email

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Fri, 27 Sep 2002 03:00:00 GMT  
 Debugging WSF files
Michael,

Thank you.  Your command is what I have on my command line in the file
associations box for Open and VBS files, with the space.  Is your //x
literal?  I have a //d.  I don't understand the other part of your
reply.  Where do I put "<?job error="true" debug="true" ?>"?

Jim



Quote:
> I just added a "Start in debug" context menu command for .wsf files

with a command line of
Quote:

> C:\WINNT\System32\WScript.exe_//x "%1" %*  (where the _ is actually a
space)

> and it works fine.

> You may need to include

> <?job error="true" debug="true" ?>

> The _//d switch just allows the stop statement (de{*filter*} in jscript)
to work.

> --
> Michael Harris
> MVP Scripting




Quote:
> Good info, thanks...

> Now, I've got it working from a command prompt.  But is there any way
> to get the de{*filter*} to work via file association?  I've
> tried "C:\WINNT\System32\WScript.exe "%1" %* file://d"

and "C:\WINNT\System32

- Show quoted text -

Quote:
> \WScript.exe file://d "%1" %*" to no avail.

> Jim



> > To enable debugging in general for WSH hosted scripts (and also
> WSCs), set the registry key

> > HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings

> > named value JITDebug = 1 (DWORD)

> > You may need to add both the Settings key and the JITDebug if they
> aren't there already.

> > Note that the

> > ...\Windows Script Host\...
> > ...\Windows Scripting Host\...

> > are obsolete (used by WSH 1.0 and the 2.0 betas).

> > Once the JITDebug value is set to 1 (note: the _ is a space to avoid
> wscript file://x)

> > To start in the de{*filter*}:

> > wscript.exe_//x myscript.wsf

> > To enable the stop statement (de{*filter*} in jscript):

> > wscript.exe_//d myscript.wsf

> > If you use strict xml syntax you need the <?job...?> processing
> instruction (PI).

> > <?xml version="1.0"?>
> > <job>
> > <?job error="yes" debug="yes"?>
> > <script language="vbscript">
> > <![CDATA[
> > stop
> > msgbox "hello"
> > ]]>
> > </script>
> > </job>

> > If not strict xml, then the <?job...?> PI isn't required but still
> works.

> > <job>
> > <script language="vbscript">
> > stop
> > msgbox "hello"
> > </script>
> > </job>

> > --
> > Michael Harris
> > MVP Scripting



> > Does anyone know how to start the Microsoft Script De{*filter*} on a WSF
> file?

> > Thanks,
> > Chris Wood

> --
> Jim
> Please CC: by email

> Sent via Deja.com http://www.*-*-*.com/
> Before you buy.

--
Jim
Please CC: by email

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sat, 28 Sep 2002 03:00:00 GMT  
 Debugging WSF files
OOps, my mistake.  I had associated the line with .VBE by mistake.  It
works fine now.  Thanks for the help.

Do you know of a decent editor for script files?  I don't really want
to invest in Visual Studio just for these.  But I thought there might
be a low cost or shareware editor out there.

Jim


Quote:
> I just added a "Start in debug" context menu command for .wsf files

with a command line of
Quote:

> C:\WINNT\System32\WScript.exe_//x "%1" %*  (where the _ is actually a
space)

> and it works fine.

> You may need to include

> <?job error="true" debug="true" ?>

> The _//d switch just allows the stop statement (de{*filter*} in jscript)
to work.

> --
> Michael Harris
> MVP Scripting




Quote:
> Good info, thanks...

> Now, I've got it working from a command prompt.  But is there any way
> to get the de{*filter*} to work via file association?  I've
> tried "C:\WINNT\System32\WScript.exe "%1" %* file://d"

and "C:\WINNT\System32

- Show quoted text -

Quote:
> \WScript.exe file://d "%1" %*" to no avail.

> Jim



> > To enable debugging in general for WSH hosted scripts (and also
> WSCs), set the registry key

> > HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings

> > named value JITDebug = 1 (DWORD)

> > You may need to add both the Settings key and the JITDebug if they
> aren't there already.

> > Note that the

> > ...\Windows Script Host\...
> > ...\Windows Scripting Host\...

> > are obsolete (used by WSH 1.0 and the 2.0 betas).

> > Once the JITDebug value is set to 1 (note: the _ is a space to avoid
> wscript file://x)

> > To start in the de{*filter*}:

> > wscript.exe_//x myscript.wsf

> > To enable the stop statement (de{*filter*} in jscript):

> > wscript.exe_//d myscript.wsf

> > If you use strict xml syntax you need the <?job...?> processing
> instruction (PI).

> > <?xml version="1.0"?>
> > <job>
> > <?job error="yes" debug="yes"?>
> > <script language="vbscript">
> > <![CDATA[
> > stop
> > msgbox "hello"
> > ]]>
> > </script>
> > </job>

> > If not strict xml, then the <?job...?> PI isn't required but still
> works.

> > <job>
> > <script language="vbscript">
> > stop
> > msgbox "hello"
> > </script>
> > </job>

> > --
> > Michael Harris
> > MVP Scripting



> > Does anyone know how to start the Microsoft Script De{*filter*} on a WSF
> file?

> > Thanks,
> > Chris Wood

> --
> Jim
> Please CC: by email

> Sent via Deja.com http://www.*-*-*.com/
> Before you buy.

--
Jim
Please CC: by email

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sat, 28 Sep 2002 03:00:00 GMT  
 Debugging WSF files
As for good script editors...

EditPlus www.editplus.com is popular and $30
UltraEdit www.ultraedit.com is also popular and $30
EditPad www.jgsoft.com/editpad.shtm is "almost free" according to the author
NoteTab www.notetab.com is also good. Light version is free and Pro version is $10
PrimalScript www.sapien.com/primalscript.htm is high-end and $99

There are others but these are all ones I've used personally at one time or another (I use EditPlus
at the moment)...

--
Michael Harris
MVP Scripting

OOps, my mistake.  I had associated the line with .VBE by mistake.  It
works fine now.  Thanks for the help.

Do you know of a decent editor for script files?  I don't really want
to invest in Visual Studio just for these.  But I thought there might
be a low cost or shareware editor out there.

Jim


Quote:
> I just added a "Start in debug" context menu command for .wsf files

with a command line of
Quote:

> C:\WINNT\System32\WScript.exe_//x "%1" %*  (where the _ is actually a
space)

> and it works fine.

> You may need to include

> <?job error="true" debug="true" ?>

> The _//d switch just allows the stop statement (de{*filter*} in jscript)
to work.

> --
> Michael Harris
> MVP Scripting




Quote:
> Good info, thanks...

> Now, I've got it working from a command prompt.  But is there any way
> to get the de{*filter*} to work via file association?  I've
> tried "C:\WINNT\System32\WScript.exe "%1" %* file://d"

and "C:\WINNT\System32

- Show quoted text -

Quote:
> \WScript.exe file://d "%1" %*" to no avail.

> Jim



> > To enable debugging in general for WSH hosted scripts (and also
> WSCs), set the registry key

> > HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings

> > named value JITDebug = 1 (DWORD)

> > You may need to add both the Settings key and the JITDebug if they
> aren't there already.

> > Note that the

> > ...\Windows Script Host\...
> > ...\Windows Scripting Host\...

> > are obsolete (used by WSH 1.0 and the 2.0 betas).

> > Once the JITDebug value is set to 1 (note: the _ is a space to avoid
> wscript file://x)

> > To start in the de{*filter*}:

> > wscript.exe_//x myscript.wsf

> > To enable the stop statement (de{*filter*} in jscript):

> > wscript.exe_//d myscript.wsf

> > If you use strict xml syntax you need the <?job...?> processing
> instruction (PI).

> > <?xml version="1.0"?>
> > <job>
> > <?job error="yes" debug="yes"?>
> > <script language="vbscript">
> > <![CDATA[
> > stop
> > msgbox "hello"
> > ]]>
> > </script>
> > </job>

> > If not strict xml, then the <?job...?> PI isn't required but still
> works.

> > <job>
> > <script language="vbscript">
> > stop
> > msgbox "hello"
> > </script>
> > </job>

> > --
> > Michael Harris
> > MVP Scripting



> > Does anyone know how to start the Microsoft Script De{*filter*} on a WSF
> file?

> > Thanks,
> > Chris Wood

> --
> Jim
> Please CC: by email

> Sent via Deja.com http://www.*-*-*.com/
> Before you buy.

--
Jim
Please CC: by email

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sat, 28 Sep 2002 03:00:00 GMT  
 Debugging WSF files
Michael,

Thank you for all the info.  As it turns out, I have the MSDN version
of Visual Interdev here at work.  Man, what a bear to figure out.  All
I want to do is install the IDE.  Anyway, I seem to have it installed
but the only way to run it is to "start a project".  Doesn't seem to be
any way to just open a file, work on it, run it, and debug it.  Know
any good places to get help with the Interdev environment?

Jim



Quote:
> As for good script editors...

> EditPlus www.editplus.com is popular and $30
> UltraEdit www.ultraedit.com is also popular and $30
> EditPad www.jgsoft.com/editpad.shtm is "almost free" according to the
author
> NoteTab www.notetab.com is also good. Light version is free and Pro
version is $10
> PrimalScript www.sapien.com/primalscript.htm is high-end and $99

> There are others but these are all ones I've used personally at one

time or another (I use EditPlus
Quote:
> at the moment)...

> --
> Michael Harris
> MVP Scripting




Quote:
> OOps, my mistake.  I had associated the line with .VBE by mistake.  It
> works fine now.  Thanks for the help.

> Do you know of a decent editor for script files?  I don't really want
> to invest in Visual Studio just for these.  But I thought there might
> be a low cost or shareware editor out there.

> Jim


> > I just added a "Start in debug" context menu command for .wsf files
> with a command line of

> > C:\WINNT\System32\WScript.exe_//x "%1" %*  (where the _ is actually
a
> space)

> > and it works fine.

> > You may need to include

> > <?job error="true" debug="true" ?>

> > The _//d switch just allows the stop statement (de{*filter*} in jscript)
> to work.

> > --
> > Michael Harris
> > MVP Scripting



> > Good info, thanks...

> > Now, I've got it working from a command prompt.  But is there any
way
> > to get the de{*filter*} to work via file association?  I've
> > tried "C:\WINNT\System32\WScript.exe "%1" %* file://d"
> and "C:\WINNT\System32
> > \WScript.exe file://d "%1" %*" to no avail.

> > Jim



> > > To enable debugging in general for WSH hosted scripts (and also
> > WSCs), set the registry key

> > > HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings

> > > named value JITDebug = 1 (DWORD)

> > > You may need to add both the Settings key and the JITDebug if they
> > aren't there already.

> > > Note that the

> > > ...\Windows Script Host\...
> > > ...\Windows Scripting Host\...

> > > are obsolete (used by WSH 1.0 and the 2.0 betas).

> > > Once the JITDebug value is set to 1 (note: the _ is a space to
avoid
> > wscript file://x)

> > > To start in the de{*filter*}:

> > > wscript.exe_//x myscript.wsf

> > > To enable the stop statement (de{*filter*} in jscript):

> > > wscript.exe_//d myscript.wsf

> > > If you use strict xml syntax you need the <?job...?> processing
> > instruction (PI).

> > > <?xml version="1.0"?>
> > > <job>
> > > <?job error="yes" debug="yes"?>
> > > <script language="vbscript">
> > > <![CDATA[
> > > stop
> > > msgbox "hello"
> > > ]]>
> > > </script>
> > > </job>

> > > If not strict xml, then the <?job...?> PI isn't required but still
> > works.

> > > <job>
> > > <script language="vbscript">
> > > stop
> > > msgbox "hello"
> > > </script>
> > > </job>

> > > --
> > > Michael Harris
> > > MVP Scripting



> > > Does anyone know how to start the Microsoft Script De{*filter*} on a
WSF
> > file?

> > > Thanks,
> > > Chris Wood

> > --
> > Jim
> > Please CC: by email

> > Sent via Deja.com http://www.*-*-*.com/
> > Before you buy.

> --
> Jim
> Please CC: by email

> Sent via Deja.com http://www.*-*-*.com/
> Before you buy.

--
Jim
Please CC: by email

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 29 Sep 2002 03:00:00 GMT  
 Debugging WSF files
Sorry, I don't personally use InterDev...

You might try the microsoft.public.vstudio.development or microsoft.public.vstudio.general
newsgroups...

--
Michael Harris
MVP Scripting

Michael,

Thank you for all the info.  As it turns out, I have the MSDN version
of Visual Interdev here at work.  Man, what a bear to figure out.  All
I want to do is install the IDE.  Anyway, I seem to have it installed
but the only way to run it is to "start a project".  Doesn't seem to be
any way to just open a file, work on it, run it, and debug it.  Know
any good places to get help with the Interdev environment?

Jim



Quote:
> As for good script editors...

> EditPlus www.editplus.com is popular and $30
> UltraEdit www.ultraedit.com is also popular and $30
> EditPad www.jgsoft.com/editpad.shtm is "almost free" according to the
author
> NoteTab www.notetab.com is also good. Light version is free and Pro
version is $10
> PrimalScript www.sapien.com/primalscript.htm is high-end and $99

> There are others but these are all ones I've used personally at one

time or another (I use EditPlus
Quote:
> at the moment)...

> --
> Michael Harris
> MVP Scripting




Quote:
> OOps, my mistake.  I had associated the line with .VBE by mistake.  It
> works fine now.  Thanks for the help.

> Do you know of a decent editor for script files?  I don't really want
> to invest in Visual Studio just for these.  But I thought there might
> be a low cost or shareware editor out there.

> Jim


> > I just added a "Start in debug" context menu command for .wsf files
> with a command line of

> > C:\WINNT\System32\WScript.exe_//x "%1" %*  (where the _ is actually
a
> space)

> > and it works fine.

> > You may need to include

> > <?job error="true" debug="true" ?>

> > The _//d switch just allows the stop statement (de{*filter*} in jscript)
> to work.

> > --
> > Michael Harris
> > MVP Scripting



> > Good info, thanks...

> > Now, I've got it working from a command prompt.  But is there any
way
> > to get the de{*filter*} to work via file association?  I've
> > tried "C:\WINNT\System32\WScript.exe "%1" %* file://d"
> and "C:\WINNT\System32
> > \WScript.exe file://d "%1" %*" to no avail.

> > Jim



> > > To enable debugging in general for WSH hosted scripts (and also
> > WSCs), set the registry key

> > > HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings

> > > named value JITDebug = 1 (DWORD)

> > > You may need to add both the Settings key and the JITDebug if they
> > aren't there already.

> > > Note that the

> > > ...\Windows Script Host\...
> > > ...\Windows Scripting Host\...

> > > are obsolete (used by WSH 1.0 and the 2.0 betas).

> > > Once the JITDebug value is set to 1 (note: the _ is a space to
avoid
> > wscript file://x)

> > > To start in the de{*filter*}:

> > > wscript.exe_//x myscript.wsf

> > > To enable the stop statement (de{*filter*} in jscript):

> > > wscript.exe_//d myscript.wsf

> > > If you use strict xml syntax you need the <?job...?> processing
> > instruction (PI).

> > > <?xml version="1.0"?>
> > > <job>
> > > <?job error="yes" debug="yes"?>
> > > <script language="vbscript">
> > > <![CDATA[
> > > stop
> > > msgbox "hello"
> > > ]]>
> > > </script>
> > > </job>

> > > If not strict xml, then the <?job...?> PI isn't required but still
> > works.

> > > <job>
> > > <script language="vbscript">
> > > stop
> > > msgbox "hello"
> > > </script>
> > > </job>

> > > --
> > > Michael Harris
> > > MVP Scripting



> > > Does anyone know how to start the Microsoft Script De{*filter*} on a
WSF
> > file?

> > > Thanks,
> > > Chris Wood

> > --
> > Jim
> > Please CC: by email

> > Sent via Deja.com http://www.*-*-*.com/
> > Before you buy.

> --
> Jim
> Please CC: by email

> Sent via Deja.com http://www.*-*-*.com/
> Before you buy.

--
Jim
Please CC: by email

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 29 Sep 2002 03:00:00 GMT  
 Debugging WSF files
Good suggestion, I'll go over there...

Thanks,
Jim



Quote:
> Sorry, I don't personally use InterDev...

> You might try the microsoft.public.vstudio.development or

microsoft.public.vstudio.general
Quote:
> newsgroups...

> --
> Michael Harris
> MVP Scripting




Quote:
> Michael,

> Thank you for all the info.  As it turns out, I have the MSDN version
> of Visual Interdev here at work.  Man, what a bear to figure out.  All
> I want to do is install the IDE.  Anyway, I seem to have it installed
> but the only way to run it is to "start a project".  Doesn't seem to
be
> any way to just open a file, work on it, run it, and debug it.  Know
> any good places to get help with the Interdev environment?

> Jim



> > As for good script editors...

> > EditPlus www.editplus.com is popular and $30
> > UltraEdit www.ultraedit.com is also popular and $30
> > EditPad www.jgsoft.com/editpad.shtm is "almost free" according to
the
> author
> > NoteTab www.notetab.com is also good. Light version is free and Pro
> version is $10
> > PrimalScript www.sapien.com/primalscript.htm is high-end and $99

> > There are others but these are all ones I've used personally at one
> time or another (I use EditPlus
> > at the moment)...

> > --
> > Michael Harris
> > MVP Scripting



> > OOps, my mistake.  I had associated the line with .VBE by mistake.
It
> > works fine now.  Thanks for the help.

> > Do you know of a decent editor for script files?  I don't really
want
> > to invest in Visual Studio just for these.  But I thought there
might
> > be a low cost or shareware editor out there.

> > Jim


> > > I just added a "Start in debug" context menu command for .wsf
files
> > with a command line of

> > > C:\WINNT\System32\WScript.exe_//x "%1" %*  (where the _ is
actually
> a
> > space)

> > > and it works fine.

> > > You may need to include

> > > <?job error="true" debug="true" ?>

> > > The _//d switch just allows the stop statement (de{*filter*} in
jscript)
> > to work.

> > > --
> > > Michael Harris
> > > MVP Scripting



> > > Good info, thanks...

> > > Now, I've got it working from a command prompt.  But is there any
> way
> > > to get the de{*filter*} to work via file association?  I've
> > > tried "C:\WINNT\System32\WScript.exe "%1" %* file://d"
> > and "C:\WINNT\System32
> > > \WScript.exe file://d "%1" %*" to no avail.

> > > Jim



> > > > To enable debugging in general for WSH hosted scripts (and also
> > > WSCs), set the registry key

> > > > HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings

> > > > named value JITDebug = 1 (DWORD)

> > > > You may need to add both the Settings key and the JITDebug if
they
> > > aren't there already.

> > > > Note that the

> > > > ...\Windows Script Host\...
> > > > ...\Windows Scripting Host\...

> > > > are obsolete (used by WSH 1.0 and the 2.0 betas).

> > > > Once the JITDebug value is set to 1 (note: the _ is a space to
> avoid
> > > wscript file://x)

> > > > To start in the de{*filter*}:

> > > > wscript.exe_//x myscript.wsf

> > > > To enable the stop statement (de{*filter*} in jscript):

> > > > wscript.exe_//d myscript.wsf

> > > > If you use strict xml syntax you need the <?job...?> processing
> > > instruction (PI).

> > > > <?xml version="1.0"?>
> > > > <job>
> > > > <?job error="yes" debug="yes"?>
> > > > <script language="vbscript">
> > > > <![CDATA[
> > > > stop
> > > > msgbox "hello"
> > > > ]]>
> > > > </script>
> > > > </job>

> > > > If not strict xml, then the <?job...?> PI isn't required but
still
> > > works.

> > > > <job>
> > > > <script language="vbscript">
> > > > stop
> > > > msgbox "hello"
> > > > </script>
> > > > </job>

> > > > --
> > > > Michael Harris
> > > > MVP Scripting



> > > > Does anyone know how to start the Microsoft Script De{*filter*} on a
> WSF
> > > file?

> > > > Thanks,
> > > > Chris Wood

> > > --
> > > Jim
> > > Please CC: by email

> > > Sent via Deja.com http://www.*-*-*.com/
> > > Before you buy.

> > --
> > Jim
> > Please CC: by email

> > Sent via Deja.com http://www.*-*-*.com/
> > Before you buy.

> --
> Jim
> Please CC: by email

> Sent via Deja.com http://www.*-*-*.com/
> Before you buy.

--
Jim
Please CC: by email

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Mon, 30 Sep 2002 03:00:00 GMT  
 
 [ 19 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Can't debug .wsf files

2. Debugging wsf files

3. Debug client-side .JS or .WSF

4. WScript debugging with Interdev (VBS, WSF, etc)

5. Debugging .wsf's

6. What happen with WSF and DEBUG (WSH 2.0 Final Version)

7. WScript debugging with Interdev (VBS, WSF, etc)

8. debugging WSF-scripts

9. UltraEdit word file for .WSF files

10. changing file extension for .wsf file

11. calling the wsf from the wsf

12. WSF include another WSF

 

 
Powered by phpBB® Forum Software