Solved

Can Visual Studio 2005 be used to debug vbscript files (.vbs)

Posted on 2006-06-15
7
5,233 Views
Last Modified: 2012-05-05
Is there a way to use Visual Studio 2005 to debug VBScript (*.vbs) files?  When I load a vbs file into an empty project it looks like I can set break points and the syntax is color coded (though there does not seem to be any intellisense).
0
Comment
Question by:modotx
7 Comments
 
LVL 10

Expert Comment

by:jagadeesh_motamarri
ID: 16916350
Hi modotx,

Check out the following link -

http://odetocode.com/Articles/425.aspx

____Jags.
0
 

Author Comment

by:modotx
ID: 16916460
There was not a mention of how to debug VBScript when it is in a *.vbs file.  It talks about how to debug vbscript within a web page by connecting to a running process.  Should I somehow cause a vbs script to pause and then try to connect to the cmd.exe process?
0
 
LVL 4

Expert Comment

by:noam_dz
ID: 16918777
Is the VBS part of a web page or it is a WSH which runs on windows?
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:modotx
ID: 16918882
It is a WSH running under Windows.
0
 
LVL 4

Expert Comment

by:noam_dz
ID: 16919263
looking at
http://www.google.com/search?num=100&hl=en&lr=&q=interdev+wsh
this looks good and recent:
http://support.microsoft.com/default.aspx?scid=kb;en-us;308364

Interdev is not part of VS 2005.
Visual Web Developer 2005 which is part of VS 2005 isn't mentioned for WSH debugging.

So it seems to me the answer for your q. is no.
0
 
LVL 4

Accepted Solution

by:
Rakafkaven earned 250 total points
ID: 17012679
I may be reading noam_dz's answer wrong, but I think I disagree.  Following the instructions mentioned on http://support.microsoft.com/default.aspx?scid=kb;en-us;308364  and launching my vbs from the Start Menu --> Run... prompt like so:

wscript.exe //d //x C:\myscript.vbs
(replace C:\myscript.vbs with your actual path and scriptname, of course)

...works perfectly for me.  The //x switch triggers an immediate exception, and I received a "Just-In-Time Debugging" pop-up offering a number of debuggers, including a "New instance of Visual Studio".  Once in there, I can step through the code with breakpoints and variable monitoring and everything else a successful debugging party might need.

This won't work for ASP.NET (since ASP.NET doesn't terminate the application when an unhandled exception occurs), but it should work for anything else-- particularly for .vbs files.
0
 
LVL 2

Expert Comment

by:mi1400
ID: 25326019
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Navigation is an important part of web design from a usability perspective. But it is often a pain when it comes to a developer’s perspective. By navigation, it often means menuing. This is less theory and more practical of how to get a specific gro…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question