This method of the IRemoteMethodField interface has been superseded by IMethodLocation::SetBreakpoint. New debuggers should call that method instead.
The SetBreakpoint method sets a code breakpoint at a given bytecode offset from the start of this method. If the code breakpoint is hit, the Microsoft VM will call the debugger’s IRemoteProcessCallbackEx2::CodeBreakpointEvent method.
HRESULT SetBreakpoint(ULONG offPC)
[in] offPC | The bytecode offset within this method at which to set a code breakpoint. |
S_OK Success.
E_FAIL Unable to set a code breakpoint at the given bytecode offset in this method.
E_OUTOFMEMORY Insufficient memory.
The Microsoft VM will not validate that the given offset corresponds to the beginning of a bytecode instruction. A code breakpoint can be set at any offset within the method’s bytecodes. Breakpoints are reference counted and can be set multiple times at the same bytecode offset.