Al
Sun Jan 25 13:22:02 CST 2004
"Fouad" <psycic000@hotmail.com> wrote in message
news:e9uhaiy4DHA.3548@TK2MSFTNGP11.phx.gbl...
> I am using a simple VBS files to automate some tasks, I don't know
wheather
> they are host or not!! And I need to debug the script I am doing (yes,
GUI),
> is it possible?
If you are dealing with vbscript code contained within files having the .VBS
(or, perhaps, .WSF) filename extension, and if you are running them directly
(rather than, say, having them referenced by a <script> tag in an html
file), then they are most probably being run (or "hosted") by Windows Script
Host (WSH).
WSH has two "host" engines, the cscript.exe and wscript.exe files mentioned
by Michael below. Other possible "hosts" include IE, IIS, and etc.
If you are running these scripts directly, though, I would assume WSH, and
follow Michael's suggestions, which are basically this:
cscript //nologo //X myscript.vbs: this starts the script in the debugger.
cscript //nologo //D myscript.vbs: this starts the script directly, but
causes the debugger to take control when a STOP statement is executed.
> Excuse my knowledge...
Knowledge, and the lack thereof, are both excused. Without both, there would
be no newsgroup ;-)
> "Michael Harris (MVP)" <mikhar at mvps dot org> wrote in message
> news:eLEpuXJ4DHA.2512@TK2MSFTNGP09.phx.gbl...
> > > I've downloaded Window Script Debugger but I don't know how to open
> > > it (run it). I want to start using it to debug VBS files UI am
> > > working on.
> >
> >
> > Define what '... VBS files UI ...' means.
BTW, I would have guessed that "UI" does not refer to User Interface, but is
a typo for "I"..., which gives: "... to debug VBS files I am working on"
/Al
> > If your scripts are executed via wscript or cscript, just add the //X
host
> > switch to start in the debugger. Or use the //D host switch and add a
> Stop
> > statement in the *.vbs file where you want to start the debugger.
> >
> > If you have some other host environment, you need to be more specific...
> >
> >
> > --
> > Michael Harris
> > Microsoft.MVP.Scripting
> >
> > Windows 2000 Scripting Guide
> > Microsoft® Windows®2000 Scripting Guide
> >
http://www.microsoft.com/technet/scriptcenter/scrguide/sagsas_overview.asp
> >
> > TechNet Script Center Sample Scripts
> >
http://www.microsoft.com/downloads/release.asp?ReleaseID=38942
> >
> > WSH 5.6 documentation download
> >
>
http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en
> >
>
>