Package org.eclipse.php.internal.debug.core.zend.debugger

Examples of org.eclipse.php.internal.debug.core.zend.debugger.Breakpoint


        if (breakpoint.isEnabled()) {
          fLastcmd = "breakpointAdded"; //$NON-NLS-1$
          PHPLineBreakpoint bp = (PHPLineBreakpoint) breakpoint;
          IMarker marker = bp.getMarker();

          Breakpoint runtimeBreakpoint = bp.getRuntimeBreakpoint();
          int lineNumber = runtimeBreakpoint.getLineNumber();
          String fileName = null;

          if (breakpoint instanceof PHPRunToLineBreakpoint) {
            PHPRunToLineBreakpoint rtl = (PHPRunToLineBreakpoint) breakpoint;
            IResource resource = rtl.getSourceFile();
            fileName = resource.getFullPath().toString();
          } else {
            lineNumber = marker
                .getAttribute(IMarker.LINE_NUMBER, 0);
            runtimeBreakpoint.setLineNumber(lineNumber);
          }

          if (fileName == null) {
            fileName = (String) marker
                .getAttribute(
                    StructuredResourceMarkerAnnotationModel.SECONDARY_ID_KEY,
                    (String) marker
                        .getAttribute(IMarker.LOCATION));
            IPath localPath = EnvironmentPathUtils
                .getLocalPath(Path.fromPortableString(fileName));
            fileName = localPath.toString();
          }

          fileName = RemoteDebugger.convertToRemoteFilename(fileName,
              this);

          runtimeBreakpoint.setFileName(fileName);
          Logger.debugMSG("PHPDebugTarget: Setting Breakpoint - File " //$NON-NLS-1$
              + fileName + " Line Number " + lineNumber); //$NON-NLS-1$
          debugger.addBreakpoint(bp.getRuntimeBreakpoint(),
              fBreakpointAddedResponseHandler);
        }
View Full Code Here


    if (supportsBreakpoint(breakpoint)) {
      if (breakpoint instanceof PHPRunToLineBreakpoint)
        return;
      fLastcmd = "breakpointRemoved"; //$NON-NLS-1$
      PHPLineBreakpoint bp = (PHPLineBreakpoint) breakpoint;
      Breakpoint runtimeBreakpoint = bp.getRuntimeBreakpoint();
      Logger.debugMSG("PHPDebugTarget: Removing Breakpoint - File " //$NON-NLS-1$
          + runtimeBreakpoint.getFileName() + " Line Number " //$NON-NLS-1$
          + runtimeBreakpoint.getLineNumber());
      fStatus = debugger.removeBreakpoint(runtimeBreakpoint,
          fBreakpointRemovedResponseHandler);
      if (!fStatus && debugger.isActive()) {
        Logger.log(Logger.ERROR,
            "PHPDebugTarget: debugger.removeBreakpoint return false"); //$NON-NLS-1$
View Full Code Here

        .getBreakpoints(IPHPDebugConstants.ID_PHP_DEBUG_CORE);
    for (IBreakpoint breakpoint : breakpoints) {
      if (supportsBreakpoint(breakpoint)) {
        if (breakpoint instanceof PHPLineBreakpoint) {
          PHPLineBreakpoint lineBreakpoint = (PHPLineBreakpoint) breakpoint;
          Breakpoint zBP = lineBreakpoint.getRuntimeBreakpoint();
          String bFileName = zBP.getFileName();
          int bLineNumber = zBP.getLineNumber();
          if (bLineNumber == lineNumber && bFileName.equals(fileName)) {
            return breakpoint;
          }
        }
      }
View Full Code Here

    return byteArray;
  }

  public static Breakpoint readBreakpoint(DataInputStream in)
      throws IOException {
    Breakpoint breakPoint = new Breakpoint();
    breakPoint.setType(in.readShort());
    breakPoint.setLifeTime(in.readShort());
    if (breakPoint.getType() == Breakpoint.ZEND_CONDITIONAL_BREAKPOINT) {
      breakPoint.setExpression(readString(in));
    }
    breakPoint.setFileName(readString(in));
    if (breakPoint.getType() == Breakpoint.ZEND_STATIC_BREAKPOINT)
      breakPoint.setLineNumber(in.readInt());
    return breakPoint;
  }
View Full Code Here

    for (int i = 0; i < breakpoints.length; i++) {
      IBreakpoint breakpoint = breakpoints[i];
      if (supportsBreakpoint(breakpoint)) {
        if (breakpoint instanceof PHPLineBreakpoint) {
          PHPLineBreakpoint lineBreakpoint = (PHPLineBreakpoint) breakpoint;
          Breakpoint zBP = lineBreakpoint.getRuntimeBreakpoint();
          String bFileName = zBP.getFileName();
          int bLineNumber = zBP.getLineNumber();
          if (bLineNumber == lineno && bFileName.equals(filename)) {
            bpFound = breakpoint;
            if (DBGpLogger.debugBP()) {
              DBGpLogger.debug("breakpoint at " + filename + "(" //$NON-NLS-1$ //$NON-NLS-2$
                  + lineno + ") found"); //$NON-NLS-1$
View Full Code Here

      for (IBreakpoint bp : breakPoints) {
        try {
          if (bp.isEnabled()) {

            PHPConditionalBreakpoint phpBP = (PHPConditionalBreakpoint) bp;
            Breakpoint runtimeBreakpoint = phpBP
                .getRuntimeBreakpoint();

            int lineNumber = (Integer) bp.getMarker().getAttribute(
                IMarker.LINE_NUMBER);
            int bpID = runtimeBreakpoint.getID();
            int bpType = runtimeBreakpoint.getType();
            int bpLifeTime = runtimeBreakpoint.getLifeTime();
            Breakpoint bpToSend = new Breakpoint(remoteFileName,
                lineNumber);
            bpToSend.setID(bpID);
            bpToSend.setType(bpType);
            bpToSend.setLifeTime(bpLifeTime);
            bpToSend.setConditionalFlag(runtimeBreakpoint
                .getConditionalFlag());
            bpToSend.setExpression(runtimeBreakpoint
                .getExpression());

            debugTarget.getRemoteDebugger().addBreakpoint(bpToSend);
            runtimeBreakpoint.setID(bpToSend.getID());
          }
        } catch (CoreException e) {
          PHPDebugPlugin.log(e);
        }
      }
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.debug.core.zend.debugger.Breakpoint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.