aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

how to debugg vbscript files or .vbs files using visual studio | how to open or run vbscript files or .vbs files

Nov 22, 2011

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


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

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


KiDo said...

I`ve just seen for the first time a file with vbs ext.
all i learned is to write inside it:
msgbox " "
what else i can write inside it???

Anonymous said...

is there any converter to convert vbscript to javascript?

Anonymous said...

Hey buddy, indeed it is very useful. I was not aware of it. But is there a way by which we can add a watch window ???

Unknown said...

Excellent. To the point what is needed. If took me just a min to understand to start going. Thanks a million.

Zoran said...

thank you a lot for sharing this. I didn't work on vbs for years, but now this comes really handy to know :)

Anonymous said...

it returned error : invalid character. have tried it with 2 working vbs script, but the results are the same. dont know whether its not working with the script or vs 2010

Anonymous said...

Thank you, this is very useful!!

unloco said...

Thanks a lot for your post :))

Ram said...

very useful to start learning VB script

Anonymous said...


Anthony said...

Awsome. Keep up the great! work. Too the point...

Unknown said...

Thanks a lot for your post :)

Anonymous said...

Thanks so much for that. I come from the .Net world and I was told that to debug a vb script file, I could only use messageboxes...I doubted it and I was right. This is making my life much simpler :)

Anonymous said...

great it's worked for me

nuju said...

thank you

Anonymous said...

Nice post, Helped me a lot.. :)

Anonymous said...

Just-In-Time debugger window was not opened when run the .vbs script as mentiond cscript /x /d Test.vbs

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.