【问题标题】:Debug WSH JScripts in Visual Studio Express在 Visual Studio Express 中调试 WSH JScript
【发布时间】:2014-12-21 01:06:18
【问题描述】:

是否可以在 Visual Studio Express 2013 中调试针对 Windows 脚本主机 (WSH) 的 JScript?

注意:代码使用GetObject 方法,出于安全原因,Internet Explorer 不再允许使用该方法。所以IE调试器不是一个选项。

我看到一个用于在 VS Express for Web 中插入 WSH 文件(除了 JScript 文件)的显式模板,但我不明白如何在 VS 调试器中运行它们。

我尝试使用管理员权限进行外部调试:

cscript.exe  //x //d script.js
cscript.exe  //d script.js
cscript.exe  //x script.js
cscript.exe  //x //d script.wsh
cscript.exe  //d script.wsh
cscript.exe  //x script.wsh

为了查看问题是否出在我的系统 Win7 x64,我安装了用于 NT 的史前 Microsoft Script Debugger 并且:

c:\windows\syswow64\cscript.exe  //x //d script.js
c:\windows\syswow64\cscript.exe  //x //d script.wsh

我怎样才能回到现代?

【问题讨论】:

    标签: visual-studio-2013 jscript wsh


    【解决方案1】:

    您可能无法使用 express 进行此操作,但您可以使用社区版进行此操作。您需要对注册表执行此操作

    [HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings]
    "JITDebug"=dword:00000001
    

    您可能希望将其添加到 Visual Studio 中的工具/外部工具中,以使生活更轻松。以 cscript //x //d 开头将提示调试器。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-06
      相关资源
      最近更新 更多