The Active Script Debugging API is a set of interfaces that allow language-neutral, host-neutral debugging, with support for a wide variety of development environments.
Active Script Debugging is language-neutral. The debugging environment can support virtually any programming language. Knowledge of a specific programming language does not need to be included in the debugging environment. The debugger can debug applications written in multiple programming languages, with cross-language stepping and breakpoints.
Active Script Debugging is host-neutral. The debugger can be used with any Active Scripting host, such as Microsoft® Internet Explorer 4.0 and later. The host application has control over the structure of the document tree presented to the user, and over the contents and syntax coloring of the documents being debugged. This allows the host application to present the source code being debugged in the context of the host documentscripts can be shown on an HTML page, for example.
This article is an overview of the Active Script Debugging API.
This section lists and defines key Active Script Debugging terms.
This documentation assumes that you understand Microsoft® Win32®, C/C++, OLE, and COM programming.
Active Script Debugging is supported by Internet Explorer 4.0 and later.
This section describes the Active Script Debugging components and lists the interfaces associated with each component.
The language engine is a component that provides parsing, execution, and debugging abstractions (such as breakpoints) for a particular language. The Active Script Debugging API provides a set of interfaces that are implemented by language engines. These interfaces are used by the host application to map between its document context and the language engine's contexts. The interfaces are also used by the debugger UI to do expression evaluation, stack enumeration, and object browsing.
Language engines implement these interfaces:
The host application is the application that hosts the script engines and provides a scriptable set of objects, or object model. The host application defines a tree of documents that can be debugged, and their contents. It organizes scripts into virtual applications.
There are two kinds of host applications. A "dumb" host supports only the basic Active Script Debugging interfaces. It has no control over the structure or organization of documents. These are determined entirely by the scripts provided to the language engines. A "smart" host supports a larger set of interfaces that allow it to define the document tree.
This is the set of simplified interfaces that a host application can use to gain the benefits of smart-hosting without having to handle the full complexity (and power) of the full set of host application interfaces:
This is the full set of host application interfaces that a smart host needs to implement:
The debugger integrated development environment (IDE) is an application that provides a debugging UI by communicating with the host application and language engines. This enables the debugger IDE to provide document viewers, document editors, and watch windows. The debugger IDE is used to manage breakpoints, evaluate expressions, and browse stack frames, objects, classes, and application structures. The debugger IDE is language-independent. The Active Script Debugging API provides a set of interfaces for implementing a debugger IDE.
Debugger IDEs implement the following interfaces:
The machine debug manager is a component that maintains a registry of debuggable application processes. It provides the hookup point between virtual applications and debuggers by maintaining and enumerating a list of active virtual applications.
Machine debug managers implement the following interfaces:
The process debug manager is a component that maintains the tree of debuggable documents for a particular application, tracks the running threads, and maintains a debugger thread for asynchronous processing. It synchronizes the debugging of multiple language engines, merges stack frames, and coordinates breakpoints and stepping. It communicates with the machine debug manager and the debugger IDE.
Process debug managers implement the following interfaces: