Checking For Errors in Script Component Files

Because Windows® Script Components are used as COM components, they normally run silently. However, while you are developing your script component file, you might find it useful to know about errors in the file. You can specify three types of error checking:

Setting Error Options

Specify error options as attributes of the XML <?component?> processing instruction.

To specify error checking

  • Include the <?component?> processing instruction at the top of the script component file (but after the optional <?XML┬á?> declaration) with one or more of the following attributes:

    • error ┬á┬á┬áSet this to true to display detailed error messages for syntax or run-time errors in the script component.

    • debug ┬á┬á┬áSet this to true to enable debugging. If this debugging is not enabled, you cannot launch the script debugger for a script component in any way.

For example, the following enables all three error reporting options:

 CopyCode imageCopy Code
<?component error="true" debug="true"?>
NoteTip

Turn error reporting off before deploying your script component to a production environment.

See Also