共用方式為


Symbol provider

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

An expression evaluator implementation must access the symbolic debug information generated by the language compiler in order to evaluate variables and expressions. It does so by consuming the interfaces of a symbol provider (SP), also called a symbol handler.

Visual Studio supplies SPs for managed code as well as native code using the Program DataBase (PDB) symbol file format. Unless there is a strong need for your program to use symbols stored in a custom format, it's recommended that you use the SPs supplied by Visual Studio.

Implementation notes

The Visual Studio debug engines expect to talk with the SPs using Common Language Runtime (CLR) interfaces. As a result, an SP that will be working with the Visual Studio debug engines must support the CLR. A complete list of all CLR debugging interfaces can be found in debugref.doc, which is part of the Windows Software Development Kit (SDK).

If your SP will be working only with your custom debug engine, you can implement the SP as you see fit depending on the needs of your debug engine.

See also