The IMethodLocation interface represents a location within a method where code can execute. The IMethodLocation interface allows a debugger to set a code breakpoint within a source line at a JIT-compiled location. IMethodLocation allows code breakpoints to be set on interpreted bytecode locations within a source line. This differs from IRemoteMethodField::SetBreakpoint, which always sets a code breakpoint at the first JIT-compiled opcode for the containing source line.
The debugger can obtain an IEnumCodeBreakpoints enumerator for all the IMethodLocation code breakpoints set in a method by calling GetCodeBreakpoints.
In some cases, the Microsoft VM might use multiple execution models for a single method (both interpreted and JIT-compiled, for example) executing in different stack frames. Using the IMethodLocation interface for setting code breakpoints yields consistent behavior across these different execution models.
// Methods HRESULT ClearBreakpoint(void) HRESULT GetBasePC(ULONG *pulPC) HRESULT GetMethod(IRemoteMethodField **ppirmf) HRESULT SetBreakpoint(void)