#291616 - 20/12/2006 17:12
IDE for VBscript?
|
carpal tunnel
Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
|
In the grand tradition of this BBS's braintrust knowing everything about everything...
I've been tasked with editing a predecessor's vbscript code.
In the past, whenever I've edited vbscript, I've knocked it out quick in notepad/ultraedit. I only used Visual Studio for actual VB code, not vbscript. But this is a much more elaborate script, and I'm wondering what the correct development environment is for this kind of code?
Can you edit VBScript code in Visual Studio? If not, is there a good IDE for that sort of thing that I just don't know about?
(You'd think that, working at Microsoft, I'd be able to find out the answer to this much quicker here. You'd be wrong. It's surprising how hard it is to find information about internal tools here...)
|
Top
|
|
|
|
#291617 - 20/12/2006 17:23
Re: IDE for VBscript?
[Re: tfabris]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Do you need a full-on IDE or do you just need something that will do syntax highlighting and indent help and so on? If the latter, I'd usually use vim, but you probably don't want to have to learn vi in order to have that feature. SlickEdit is a common Windows-based one, but it's not free. MS might have licenses, though.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#291618 - 20/12/2006 17:32
Re: IDE for VBscript?
[Re: wfaulk]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
|
Ideally, I'd want something more than syntax highlighting. Something that gave me all the features of Visual Basic itself: - Select a keyword or object reference and press F1 to open the online help for that keyword. - Automatic fill-in and description of parameters for functions. - Debugger with breakpoints. (etc.)
I've just never tried opening up Visual Studio and trying to see if one of its output types is "VBscript". And now I'm in a position where I'm trying to choose whether to go through the hassle of installing Visual Studio on my devbox here at work just to find out the answer to that question.
|
Top
|
|
|
|
#291619 - 20/12/2006 17:48
Re: IDE for VBscript?
[Re: tfabris]
|
carpal tunnel
Registered: 08/06/1999
Posts: 7868
|
File - New - File - Script shows VBScript as a choice. I did that, typed in print, then tapped F1, and up popped an online help window. I can also insert a breakpoint. This is under Visual Studio 2005 with Visual Basic support.
|
Top
|
|
|
|
#291621 - 20/12/2006 21:52
Re: IDE for VBscript?
[Re: drakino]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
|
Quote: File - New - File - Script shows VBScript as a choice. I did that, typed in print, then tapped F1, and up popped an online help window. I can also insert a breakpoint.
Okay, you can insert a breakpoint. But can you begin executing the script?
I opened the existing script, it's all syntax-highlighted and everything, I can insert a breakpoint, but the play button and the debug/start command are grayed out. How about you?
|
Top
|
|
|
|
#291622 - 20/12/2006 21:59
Re: IDE for VBscript?
[Re: tfabris]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
|
yeah, doesn't seem to like VBS as something it can just "run" under visual basic, and it's not the right kind of code for it to be an actual VB project. Hm.
|
Top
|
|
|
|
#291623 - 21/12/2006 02:25
Re: IDE for VBscript?
[Re: tfabris]
|
old hand
Registered: 15/07/2002
Posts: 828
Loc: Texas, USA
|
Primalscript perhaps? They have a trial but not sure if and how its crippled. http://www.primalscript.com/
|
Top
|
|
|
|
#291624 - 21/12/2006 08:37
Re: IDE for VBscript?
[Re: tfabris]
|
carpal tunnel
Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
|
I assume these are .vbs files that are going to be run from the commandline or installers or something ?
One way to enable you to debug them is this. Start the script with the following commandline:
wscript.exe //d <path to WSH file>
This tells wscript to launch the debugger, normally VS.NET or InterDev when an error occurs.
Now insert an error are the beginning of your script, I normally just put "debug.me" as the first line...
When wscript hits the error you will be given the option to launch the debugger of you choice.
Their may be a cleaner way of doing this, but this does at least work.
_________________________
Remind me to change my signature to something more interesting someday
|
Top
|
|
|
|
#291625 - 21/12/2006 08:40
Re: IDE for VBscript?
[Re: andy]
|
carpal tunnel
Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
|
Take a look at this Technet article as well. http://www.microsoft.com/technet/community/columns/scripts/sg0904.mspxI'm amazed that you couldn't find this info easily inside MSFT...
_________________________
Remind me to change my signature to something more interesting someday
|
Top
|
|
|
|
#291626 - 21/12/2006 15:41
Re: IDE for VBscript?
[Re: andy]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
|
Quote: One way to enable you to debug them is this. Start the script with the following commandline: wscript.exe //d <path to WSH file>
I saw this in the online help, but I didn't think it applied to me because I thought I was supposed to be running my script with CSCRIPT.EXE instead.
But yeah, this was the next thing I was gonna try. Thanks!
|
Top
|
|
|
|
#291627 - 21/12/2006 15:44
Re: IDE for VBscript?
[Re: andy]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
|
Quote: Take a look at this Technet article as well.
http://www.microsoft.com/technet/community/columns/scripts/sg0904.mspx
I'm amazed that you couldn't find this info easily inside MSFT...
And yeah, that's the article I needed, telling me how to launch the debugger with cscript. Didn't see that one in all of my searches. Thanks.
|
Top
|
|
|
|
|
|