Visual Studio 2017调试vbscript [英] Visual Studio 2017 debugging vbscript

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

问题描述

我想使用Visual Studio 2017 Community Edition调试vbscript,并按照此处针对VS2015提到的步骤进行操作:

I'd like to debug a vbscript with Visual Studio 2017 Community Edition and followed the steps mentioned here for VS2015:

视频

我输入了

cscript.exe /x foo.vbs

在命令行中输入

,但没有调试器启动.第2017版VS是否存在问题,或者有一些步骤(例如VS中的配置步骤)未在视频中显示?

in the commandline, but no debugger starts. Is there a problem with the 2017th version of VS or are there some steps (e.g. configuration steps in VS) which are not shown in the video?

我也尝试过cscript.exe //X foo.vbscscript.exe foo.vbs //Xcscript.exe //X //D foo.vbscscript.exe foo.vbs //X //D

谢谢 史蒂夫

推荐答案

这些解决方案都不适合我.在 MSDN

Neither of those solutions worked for me. Found a workaround on MSDN

  1. 启动Visual Studio.
  2. 文件->打开项目.
  3. 将其指向"C:\ Windows \ system32 \ cscript.exe"(或Windows安装目录所在的位置).
  4. 当您获得高程权限对话框时,单击忽略".
  5. 转到cscript.exe节点上的项目属性.
  6. 在参数中添加'//d'.
  7. 在调试器类型"中,将其更改为脚本.
  8. 关闭项目属性.
  9. F10 .
  1. Start Visual Studio.
  2. File -> Open Project.
  3. Point it at "C:\Windows\system32\cscript.exe" (or wherever your windows install directory is).
  4. When you get the elevation permissions dialog, click 'Ignore'.
  5. Go to project properties on the cscript.exe node.
  6. In arguments add '//d '.
  7. In 'Debugger type' change it to script.
  8. Close project properties.
  9. Hit F10.

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

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