public JavaDebugLocationPendingBreakpoint(JavaDebugEngine engine, BreakpointRequestInfo requestInfo) { Contract.Requires<ArgumentNullException>(engine != null, "engine"); Contract.Requires<ArgumentNullException>(requestInfo != null, "requestInfo"); Contract.Requires<ArgumentException>(requestInfo.Location != null); Contract.Requires<ArgumentException>(requestInfo.Location.LocationType == enum_BP_LOCATION_TYPE.BPLT_CODE_FILE_LINE); _engine = engine; _requestInfo = requestInfo; _condition = requestInfo.Condition; _passCount = requestInfo.PassCount; }
public JavaDebugLocationPendingBreakpoint(JavaDebugEngine engine, BreakpointRequestInfo requestInfo) { Contract.Requires <ArgumentNullException>(engine != null, "engine"); Contract.Requires <ArgumentNullException>(requestInfo != null, "requestInfo"); Contract.Requires <ArgumentException>(requestInfo.Location != null); Contract.Requires <ArgumentException>(requestInfo.Location.LocationType == enum_BP_LOCATION_TYPE.BPLT_CODE_FILE_LINE); _engine = engine; _requestInfo = requestInfo; _condition = requestInfo.Condition; _passCount = requestInfo.PassCount; }
/// <summary> /// Creates a pending breakpoint in the debug engine (DE). /// </summary> /// <param name="breakpointRequest">An IDebugBreakpointRequest2 object that describes the pending breakpoint to create.</param> /// <param name="pendingBreakpoint">Returns an IDebugPendingBreakpoint2 object that represents the pending breakpoint.</param> /// <returns> /// If successful, returns S_OK; otherwise, returns an error code. Typically returns E_FAIL if the pBPRequest parameter /// does not match any language supported by the DE of if the pBPRequest parameter is invalid or incomplete. /// </returns> /// <remarks> /// A pending breakpoint is essentially a collection of all the information needed to bind a breakpoint to code. The /// pending breakpoint returned from this method is not bound to code until the IDebugPendingBreakpoint2.Bind method /// is called. /// /// For each pending breakpoint the user sets, the session debug manager (SDM) calls this method in each attached DE. /// It is up to the DE to verify that the breakpoint is valid for programs running in that DE. /// /// When the user sets a breakpoint on a line of code, the DE is free to bind the breakpoint to the closest line in /// the document that corresponds to this code. This makes it possible for the user to set a breakpoint on the first /// line of a multi-line statement, but bind it on the last line (where all the code is attributed in the debug /// information). /// </remarks> public int CreatePendingBreakpoint(IDebugBreakpointRequest2 breakpointRequest, out IDebugPendingBreakpoint2 pendingBreakpoint) { pendingBreakpoint = null; BreakpointRequestInfo requestInfo = new BreakpointRequestInfo(breakpointRequest); if (requestInfo.LanguageGuid != Constants.JavaLanguageGuid && requestInfo.LanguageGuid != Guid.Empty) { return(VSConstants.E_FAIL); } if (requestInfo.Location.LocationType == enum_BP_LOCATION_TYPE.BPLT_CODE_FILE_LINE) { pendingBreakpoint = new JavaDebugLocationPendingBreakpoint(this, requestInfo); _pendingBreakpoints.Add(pendingBreakpoint); return(VSConstants.S_OK); } throw new NotImplementedException(); }
/// <summary> /// Creates a pending breakpoint in the debug engine (DE). /// </summary> /// <param name="breakpointRequest">An IDebugBreakpointRequest2 object that describes the pending breakpoint to create.</param> /// <param name="pendingBreakpoint">Returns an IDebugPendingBreakpoint2 object that represents the pending breakpoint.</param> /// <returns> /// If successful, returns S_OK; otherwise, returns an error code. Typically returns E_FAIL if the pBPRequest parameter /// does not match any language supported by the DE of if the pBPRequest parameter is invalid or incomplete. /// </returns> /// <remarks> /// A pending breakpoint is essentially a collection of all the information needed to bind a breakpoint to code. The /// pending breakpoint returned from this method is not bound to code until the IDebugPendingBreakpoint2.Bind method /// is called. /// /// For each pending breakpoint the user sets, the session debug manager (SDM) calls this method in each attached DE. /// It is up to the DE to verify that the breakpoint is valid for programs running in that DE. /// /// When the user sets a breakpoint on a line of code, the DE is free to bind the breakpoint to the closest line in /// the document that corresponds to this code. This makes it possible for the user to set a breakpoint on the first /// line of a multi-line statement, but bind it on the last line (where all the code is attributed in the debug /// information). /// </remarks> public int CreatePendingBreakpoint(IDebugBreakpointRequest2 breakpointRequest, out IDebugPendingBreakpoint2 pendingBreakpoint) { pendingBreakpoint = null; BreakpointRequestInfo requestInfo = new BreakpointRequestInfo(breakpointRequest); if (requestInfo.LanguageGuid != Constants.JavaLanguageGuid && requestInfo.LanguageGuid != Guid.Empty) return VSConstants.E_FAIL; if (requestInfo.Location.LocationType == enum_BP_LOCATION_TYPE.BPLT_CODE_FILE_LINE) { pendingBreakpoint = new JavaDebugLocationPendingBreakpoint(this, requestInfo); _pendingBreakpoints.Add(pendingBreakpoint); return VSConstants.S_OK; } throw new NotImplementedException(); }