如何调试独立的VBScript脚本? [英] How do I debug a stand-alone VBScript script?
问题描述
我有一个 VBScript 脚本,需要2个命令行参数并进行一些验证。
我需要调试这个来查看程序如何执行。
我试图将它粘贴到Excel(使用 VBA )。然而,有些构造像 Const
等不受支持,加上像使用命令行参数一样的验证失败。
I have a VBScript script that takes 2 command-line arguments and does some validation.
I need to debug this to see how the program is getting executed.
I was trying to paste this into Excel (using VBA). However there are some constructs like Const
, etc. that are not being supported, plus certain validations like taking the command-line arguments are failing.
因此,我想知道是否有任何方法来调试此脚本。
我安装了Windows XP和Office 2003。我不能在办公室电脑上安装任何其他应用程序。
Hence I would like to know if there is any way to debug this script. I have Windows XP and Office 2003 installed. I cannot install any other applications on the office computer.
推荐答案
运行cscript.exe以获取完整的命令参考,我认为
Run cscript.exe for full command args, I think
cscript //X scriptfile.vbs MyArg1 MyArg2
将在调试器中运行脚本。
will run the script in a debugger.
这篇关于如何调试独立的VBScript脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!