
(Temporarily) disable all On Error Resume Next lines It will also help you find variables with the wrong scope (local vs. It may seem a nuisance to force yourself to declare all variables, but trust me, Option Explicit will save you a lot of time searching for errors caused by typos in variable names. Make sure you log any requirements that aren't met, and/or display descriptive error messages.Īlways use Option Explicit and declare all variables Always check if required extensions are available before trying to use them!.If you create a new instance of an object, use custom error handling with Err and IsObject to check if it was successfully created.Never assume an open Internet connection.Never assume a script runs with administrative rights.See the paragraph " Test for 32-bit MSHTA.EXE on 64-bit Windows" below to see how you can test this in HTAs. Never even assume the script runs in a 64-bit environment when on 64-bit Windows!

when third party COM objects or external commands are used). 64-bit), test in case it might be critical (i.e.
#Microsoft script debugger for vbscript windows

(Temporarily) disable all On Error Resume Next lines.Always use Option Explicit and declare all variables.

This page describes some (debugging) techniques that will help you avoid errors in VBScript, or to find and correct them. Scripts will seldom be perfect right away. VBScript Scripting Techniques > Debugging Your Scripts Debugging Your Scripts VoltCraft Energy Logger 3500 Configuration.
