public int Bind() { IDebugDocumentPosition2 docPosition = (IDebugDocumentPosition2)(Marshal.GetObjectForIUnknown(m_bpRequestInfo.bpLocation.unionmember2)); string filename; docPosition.GetFileName(out filename); TEXT_POSITION[] startPosition = new TEXT_POSITION[1]; TEXT_POSITION[] endPosition = new TEXT_POSITION[1]; EngineUtils.CheckOk(docPosition.GetRange(startPosition, endPosition)); Command bpCommand = new BreakpointCommand(Path.GetFileName(filename), (int)startPosition[0].dwLine + 1); m_engine.EnqueueCommand(bpCommand); AD7DocumentContext docContext = new AD7DocumentContext(filename, startPosition[0], endPosition[0]); AD7BreakpointResolution breakpointResolution = new AD7BreakpointResolution(this.m_engine, docContext); AD7BoundBreakpoint boundBreakpoint = new AD7BoundBreakpoint(this.m_engine, this, breakpointResolution); string fileandline = Path.GetFileName(filename) + ((int)startPosition[0].dwLine + 1).ToString(); m_bpManager.StoreBoundBreakpoint(fileandline, boundBreakpoint); return(VSConstants.S_OK); }
public AD7PendingBreakpoint(IDebugBreakpointRequest2 pBPRequest, AD7Engine engine, BreakpointManager bpManager) { m_pBPRequest = pBPRequest; BP_REQUEST_INFO[] requestInfo = new BP_REQUEST_INFO[1]; EngineUtils.CheckOk(m_pBPRequest.GetRequestInfo(enum_BPREQI_FIELDS.BPREQI_BPLOCATION, requestInfo)); m_bpRequestInfo = requestInfo[0]; m_engine = engine; m_bpManager = bpManager; m_boundBreakpoints = new System.Collections.Generic.List <AD7BoundBreakpoint>(); }