Code Context


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

The latest version of this topic can be found at Code Context.

In Visual Studio debugging, a code context:

  • Provides an abstraction of a position in code as known to the debug engine (DE). For most run-time architectures today, a code context can be thought of as an address in a program's instruction stream. For nontraditional languages, where code may not be represented by instructions, a code context may be represented by some other means.

  • Describes the current position in the execution stream of the program being debugged.

  • Exists only when a program has stopped at a breakpoint.

  • Has an associated document context.

  • Is implemented by an IDebugCodeContext2 interface.

Document Context
Debugger Contexts