Visual Studio 2013和VB脚本 [英] Visual Studio 2013 and VB Scripts

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

问题描述

我想知道Visual Studio 2013是否可以编译和调试VBScript文件?
如果有人知道他们可以让我知道如何。



谢谢你的时间。

解决方案

首先,VBScript是一种解释语言,不需要编译。



但是,你可以调试你的VBScript文件内部VS2013。只需打开您要使用VS2013调试的文件。
在工具/外部工具下,您必须使用一些启动参数注册Windows Script Host(CScript.exe或WScript.exe):

 标题:CScript Debug 
命令:C:\Windows\System32\cscript.exe
参数:// nologo // X $(ItemPath)
初始目录:$(ItemDir)
检查使用输出窗口
按OK按钮

为了启动调试器,只需单击Tools / CScript Debug。 VS JIT调试器询问您,这是您想要使用的调试器。只需选择您的* .vbs文件,然后单击是。



有时候它有点错误,但它有效。 ; - )


I was wondering if Visual Studio 2013 can compile and debug VBScript files? If anyone knows could they please let me know how.

Thank you for your time.

解决方案

First of all VBScript is an interpreted language and does not need to be compiled.

But yes, you can debug your VBScript file inside VS2013. Just open the file you want to debug with VS2013. Under "Tools / External Tools" you have to register the Windows Script Host (CScript.exe or WScript.exe) with some startup parameters:

Title:             CScript Debug
Command:           C:\Windows\System32\cscript.exe
Arguments:         //nologo //X $(ItemPath)
Initial directory: $(ItemDir)
Check "Use Output window"
Hit the OK button

In order to start the debugger, just click "Tools / CScript Debug". The VS JIT debugger asks you, wich debugger you want to use. Just select your *.vbs file and click Yes.

Sometimes it is a bit buggy but it works. ;-)

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

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