在 Windows 10 中调试 VBScript [英] Debugging VBScript in Windows 10

查看:23
本文介绍了在 Windows 10 中调试 VBScript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近使用了免费的 Windows 10,将其升级到 Pro,并安装了 Office 2016 Home.我似乎丢失了所有调试器.

我以前可以打字:

"%windir%SysWOW64cscript.exe" "TestScript.vbs"//d//x

在 Windows 7 及更高版本中会弹出调试器.这一切似乎都被删除了——甚至连调试器 clsid 也不见了.

我不想安装 Visual Studio -- 有没有办法恢复极简调试器?

解决方案

我在 Windows 7 HB 上安装 MS Office 2010 后遇到了同样的问题.

取消选中所有应用程序并选中选择高级自定义:

禁用所有组件:

转到 Office 工具 - HTML 源代码编辑 - Web 脚本 并为 Web 调试 项选择 从我的电脑运行 选项:

然后完成剩下的安装过程.之后,您可以使用脚本编辑器调试器调试脚本.

我检查过的 Office 2003 和 2007 安装程序中的脚本编辑器版本相同:

我应该说我没有在 Windiws 10 上测试过,似乎 Office 2003 没有经过认证与 Windows 10 兼容,但可以使用兼容模式工作,并且 Office 2007 已确认兼容.

顺便说一句,如果您使用的是 Notepad++,那么设置使用调试器启动脚本的快捷方式可能会很方便.在创建快捷方式时,将 "C:WINDOWSSysWOW64cscript.exe"//x "$(FULL_CURRENT_PATH)" 输入 The Program to Run 字段(您可以找到说明此处).

I recently took the free Windows 10, upgraded it to Pro, and installed Office 2016 Home. I seem to have lost all my debuggers.

I used to be able to type:

"%windir%SysWOW64cscript.exe" "TestScript.vbs" //d //x

in Windows 7 and up would pop the debugger. It all seems to have been removed -- even the debugger clsid is missing.

I don't want to install Visual Studio -- is there no way to get the minimalist debugger back?

解决方案

I encountered the same issue after I'd installed MS Office 2010 on Windows 7 HB. MS Script Editor included in Office 2000 through 2007 only. So to make debug possible you still can install it from any of that packages. The example below is for Office 2003 installer on Windows 7:

Launch the installer, choose custom type of installation:

Uncheck all applications and check choose advanced customization:

Disable all components:

Go to Office Tools - HTML Source editing - Web Scripting and select Run from My Computer option for Web Debugging item:

Then finish the rest installation process. After that you can debug the scripts with Script Editor debugger.

There is the same version of Script Editor in Office 2003 and 2007 installers that I checked:

I should say I havn't tested that on Windiws 10, seems Office 2003 is not certified compatible with Windows 10 but might work using compatibility mode, and Office 2007 have been confirmed to be compatible.

BTW, if you are using Notepad++, it may be handy to setup shortcut for launching the script with debugger. Enter "C:WINDOWSSysWOW64cscript.exe" //x "$(FULL_CURRENT_PATH)" into The Program to Run field while creating shortcut (you can find description here).

这篇关于在 Windows 10 中调试 VBScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆