In this article I will explain how to run vbscript or .vbs file and how to debug vbscript or .vbs file using visual studio.

Description:

One day I got requirement like to work with vbscript during that time I don’t have idea on vbscript to run script file and I face too much problem to know how to debug vbscript. At that time I decided to write a post to explain how to run vbscript file and how to debug vbscript file or .vbs file using visual studio.

Now we have vbscript file with name Test.vbs we want to run vbscript file to check the output for that we need to do one thing that is just double click on that vbscript file automatically that script will execute and perform the operations written inside of vbscript file that’s it very simple one.

If we want to make modifications in vbscript file then select your vbscript file (Ex: Test.vbs) and open with either NotePad or Visual studio once your modifications are done save the file and double click on your vbscript file (Ex: Test.vbs).

Till now we learned how to modify vbscript file and how to run vbscript or .vbs file. Suppose if I want to debug vbscript file then how I can do that one.

To debug vbscript file or .vbs file follow below steps

First Open Command Prompt and point to the folder wherever your script file will exist. Here I am pointing to folder D because my script file (Test.vbs) will exist in that folder once we point to required folder type command cscript /x /d Test.vbs

After enter the command click on enter button whenever we click on enter button we are able to see Just-In-Time debugger window in that select required version of visual studio to debug your vbscript file. Now here I am selecting Visual Studio 2005 and click Yes button.

After click yes button it will open script file with debugger like this

I hope it helpful for the people who are in need with this type of requirement. Happy coding.....