Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

15 views
Skip to first unread message

Hilde

unread,
Apr 12, 2002, 3:19:36 PM4/12/02
to
I have a problem on a Windows XP Professional Machine and the same
problems occurs on a Windows NT4-server-machine: what go's wrong?
I have microsoft script editor (MSE) installed via MS FP2000. I start
the script editor and want to debug a very simple script (Hello World)
just to see step by step what's going on? Nothing happens!! When I
start the script via quick launch (3rd tab), it works.
I think the cause of my problem is that I can't change the options of
MSE: I want to check the box near just-in-time debugging but when I
check the box, says everything is OK, then, when I open the options
window again, the checkbox is empty. Why??

Michael Harris (MVP)

unread,
Apr 12, 2002, 9:32:31 PM4/12/02
to


Initiating debugging from MSE is only supported for script embedded in html.

You need to run you script using wscript or cscript with //X to start in the debugger or //D switch to enable the vbscript stop and jscript debugger statements to work...


--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--

Hilde

unread,
Apr 13, 2002, 5:16:22 AM4/13/02
to
Ok, this way, I can debug and walk through my code, but how can i do
it with the microsoft script editor. Earlier I had a windows 98
machine and when I took a script, placed it between <script ..> and
</script> tags, then I could walk step by step trough the code in MSE.
MSE has the advantage that you get help when writing code, that isn't
the case with the script debugger.

Michael Harris (MVP)

unread,
Apr 13, 2002, 2:49:20 PM4/13/02
to
When you use 'wscript //x myscript.vbs' what debugger is invoked? If not MSE, then MSE isn't the default debugger. Whatever may have worked for you on a Win98 machine with MSE as the default debugger apparently *isn't* working for you on your current machine.

The whole issue on multiple dev software installs that each have script debugging capabilities can get pretty messed up. And I have never seen an clear, easy to follow instructions on how to safely and reliably restore a given debugger as the default.

FWIW, on my Win2K Pro box with MSE7 (from Office XP), VS6 EE, *and* VS.NET AE all installed, I get a dialog box that lets me choose which of the debuggers I want to use.

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--

Hilde

unread,
Apr 14, 2002, 5:30:00 AM4/14/02
to
The extra debugger I got was Microsoft Debugger. Now, I de-installed
it and when I execute via wscript //x test.vbs, I just get the output
of my script, no debugging anymore, however, MSE is still on my
machine.

Michael Harris (MVP)

unread,
Apr 14, 2002, 6:56:21 PM4/14/02
to
Here's JScript (written by Alex Riedel - PrimalScript Lead Engineer) that I picked up a few months ago from the news://news.sapien.com/sapien.primalscript.support newsgroup that is meant to restore MSE as the script debugger. Maybe it will work for you...

/* ======================================================================

JScript Source File -- Created with SAPIEN Technologies PrimalSCRIPT(TM)

NAME: <filename>

AUTHOR: Alexander Riedel , SAPIEN Technologies, Inc.
DATE : 12/7/2001

COMMENT: <comment>

========================================================================= */
var shell = new ActiveXObject("WScript.Shell");

var JITDebugRoot = "HKCR\\CLSID\\{834128A2-51F4-11D0-8F20-00805F2Cd064}";
var JITDebugLocalServer32 = JITDebugRoot + "\\LocalServer32\\";

var LocalServer32;
var JITDebugProgID = JITDebugRoot + "\\ProgID\\";
var JITDebugVersionIndependentProgID = JITDebugRoot + "\\VersionIndependentProgID\\";

LocalServer32 = "C:\\Winnt\\System32\\mdm.exe";
shell.RegWrite(JITDebugProgID, "MDM.SESSPROV.1");
shell.RegWrite(JITDebugVersionIndependentProgID, "MDM.SESSPROV");
shell.RegWrite(JITDebugLocalServer32, LocalServer32);

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--

Hilde

unread,
Apr 15, 2002, 2:44:53 PM4/15/02
to
It doesn't work, but thanks anyway.

Hilde

Michael Harris (MVP)

unread,
Apr 15, 2002, 2:49:02 PM4/15/02
to
> It doesn't work, but thanks anyway.
>

I hope you adjusted the path written to the registry depending on what OS you run it on....

Hilde

unread,
Apr 16, 2002, 2:37:14 AM4/16/02
to
Yes, I did!
0 new messages