Sunday, October 2, 2011

Debugging VBS with Visual Studio

If you must use VBS scripts (I can't think of a reason why you would WANT to use them) then there is an easier way to debug these (other than the old school printouts).

from the command prompt run:

cscript.exe test.vbs //X

this will pop up the debugger choice with the list of Visual Studio apps available (2003/05/08/10 etc.) and will allow you to step in and debug line by line.

Apppools on Windows Server 2008

If you need to set a flag on the apppool in server 2008 you can also do that via script. Here is an example of how to set the "Enable 32bit application support" flag to "true" in server 2008 apppool:

cd %windir%\system32\inetsrv\
appcmd set apppool /apppool.name:CPOSBackOfficeWS /enable32BitAppOnWin64:true