Create a custom debug engine

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

A debug engine (DE) is a component that allows debugging of particular run-time architectures. There is typically only one DE implementation per run-time environment.

Note

While there are separate DE implementations for Transact-SQL and JScript, VBScript and JScript share a single DE.

A DE works with the interpreter or operation system to provide such debugging services as execution control, breakpoints, and expression evaluation. These services are implemented through the DE interfaces and can cause the debugger to transition between different operational modes. For more information, see Operational modes.

Creating a DE consists of the following steps:

  1. Register a DE with Visual Studio

  2. Enable a program to be debugged

  3. Implement execution control and state evaluation

  4. Send events

  5. Set up termination and detaching

In this section

Register a custom debug engine Explains the steps needed to register a debug engine with Visual Studio so that it can be used.

Enable a program to be debugged Explains that before your DE can debug a program, you must first launch the DE or attach it to an existing program.

Implement execution control and state evaluation Discusses why debugging an application requires implementing execution control features.

Send events Describes communication between the debugger and the DE as an event model based on DCOM.

Set up termination and detaching Explains how to achieve normal termination, which means that there are no breakpoints, exceptions, run-time errors, or infinite loops in the application to be debugged.

Call debugger events Documents the calling order of the events occurring in a debugging session.

How To: Debug a custom debug engine Explains how to debug a custom DE.

See also