Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2006-06-15
7
Medium Priority
?
5,246 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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 1000 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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses
Course of the Month20 days, 22 hours left to enroll

810 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