您可以在Visual Studio中调试VBScript吗? [英] Can you debug VBScript in Visual Studio?

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

问题描述

我想知道Visual Studio是否可以运行和调试VBScript文件?

I was wondering if Visual Studio can run and debug VBScript files?

谢谢您的时间。

推荐答案

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

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

但是,可以调试您的Visual Studio中的VBScript文件。
工具/外部工具 下,您必须使用一些启动参数注册Windows脚本宿主(CScript.exe或WScript.exe)(以使其在工具菜单中可用) :

But yes, you can debug your VBScript file inside Visual Studio. Under "Tools / External Tools" you have to register the Windows Script Host (CScript.exe or WScript.exe) once with some startup parameters (to make it available in the Tools menu):

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

然后,只需使用VS2013打开要调试的文件(通过File-> Open-> File ...)

Then, just open the file you want to debug with VS2013 (via File --> Open --> File...)

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

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中调试VBScript吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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