本文介绍了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.vbs
,cscript.exe foo.vbs //X
,cscript.exe //X //D foo.vbs
和cscript.exe foo.vbs //X //D
谢谢史蒂夫
推荐答案
这些解决方案都不适合我.在 MSDN
Neither of those solutions worked for me. Found a workaround on MSDN
- 启动Visual Studio.
- 文件->打开项目.
- 将其指向"C:\ Windows \ system32 \ cscript.exe"(或Windows安装目录所在的位置).
- 当您获得高程权限对话框时,单击忽略".
- 转到cscript.exe节点上的项目属性.
- 在参数中添加'//d'.
- 在调试器类型"中,将其更改为脚本.
- 关闭项目属性.
- 打.
- Start Visual Studio.
- File -> Open Project.
- Point it at "C:\Windows\system32\cscript.exe" (or wherever your windows install directory is).
- When you get the elevation permissions dialog, click 'Ignore'.
- Go to project properties on the cscript.exe node.
- In arguments add '//d '.
- In 'Debugger type' change it to script.
- Close project properties.
- Hit .
这篇关于Visual Studio 2017调试vbscript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!