当前位置: 首页>>代码示例>>Java>>正文


Java StepRequest.enable方法代码示例

本文整理汇总了Java中com.sun.jdi.request.StepRequest.enable方法的典型用法代码示例。如果您正苦于以下问题:Java StepRequest.enable方法的具体用法?Java StepRequest.enable怎么用?Java StepRequest.enable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.jdi.request.StepRequest的用法示例。


在下文中一共展示了StepRequest.enable方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doStep

import com.sun.jdi.request.StepRequest; //导入方法依赖的package包/类
private void doStep(int depth, SuspendPolicy suspendPolicy) throws DebuggerException {
  lock.lock();
  try {
    clearSteps();

    StepRequest request =
        getEventManager().createStepRequest(getCurrentThread(), StepRequest.STEP_LINE, depth);
    request.addCountFilter(1);
    request.setSuspendPolicy(toSuspendEventRequest(suspendPolicy));
    request.enable();

    resume(newDto(ResumeActionDto.class));
  } finally {
    lock.unlock();
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:17,代码来源:JavaDebugger.java

示例2: run

import com.sun.jdi.request.StepRequest; //导入方法依赖的package包/类
final String run(String[] args) {
    if (jdb.status != Status.STARTED) {
        return String.format(NOT_VALID_UNTIL_STARTED, "stepi");
    }
    StepRequest request = 
        jdb.eventRequestManager.createStepRequest(jdb.thread, 
                StepRequest.STEP_MIN, 
                StepRequest.STEP_INTO);
    request.addCountFilter(1);// next step only
    request.enable();
    return "Step one instruction.";
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:13,代码来源:Main.java

示例3: stepIntoThread

import com.sun.jdi.request.StepRequest; //导入方法依赖的package包/类
private void stepIntoThread(ThreadReference thread) {
    StepRequest request = DebugUtility.createStepIntoRequest(thread,
            this.context.getStepFilters().classNameFilters);
    currentDebugSession.getEventHub().stepEvents().filter(debugEvent -> request.equals(debugEvent.event.request()))
            .take(1).subscribe(debugEvent -> {
                debugEvent.shouldResume = false;
                // Have to send to events to keep the UI sync with the step in operations:
                context.getProtocolServer().sendEvent(new Events.StoppedEvent("step", thread.uniqueID()));
                context.getProtocolServer().sendEvent(new Events.ContinuedEvent(thread.uniqueID()));
            });
    request.enable();
    thread.resume();
}
 
开发者ID:Microsoft,项目名称:java-debug,代码行数:14,代码来源:JavaHotCodeReplaceProvider.java

示例4: doStep

import com.sun.jdi.request.StepRequest; //导入方法依赖的package包/类
private StepEvent doStep(ThreadReference thread, int gran, int depth) {
    final StepRequest sr =
            eventRequestManager().createStepRequest(thread, gran, depth);
    sr.addClassExclusionFilter("java.*");
    sr.addClassExclusionFilter("sun.*");
    sr.addClassExclusionFilter("com.sun.*");
    sr.addCountFilter(1);
    sr.enable();
    StepEvent retEvent = (StepEvent)resumeToEvent(sr);
    eventRequestManager().deleteEventRequest(sr);
    return retEvent;
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:13,代码来源:Debugger.java

示例5: run

import com.sun.jdi.request.StepRequest; //导入方法依赖的package包/类
final String run(String[] args) {
    if (jdb.status != Status.STARTED) {
        return String.format(NOT_VALID_UNTIL_STARTED, "step");
    }
    StepRequest request = 
        jdb.eventRequestManager.createStepRequest(jdb.thread, 
                StepRequest.STEP_LINE, 
                StepRequest.STEP_INTO);
    request.addCountFilter(1);// next step only
    request.enable();
    return "Step one line.";
}
 
开发者ID:shannah,项目名称:cn1,代码行数:13,代码来源:Main.java

示例6: ThreadTrace

import com.sun.jdi.request.StepRequest; //导入方法依赖的package包/类
public ThreadTrace(ThreadReference thread, VirtualMachine vm) {
    this.thread = thread;
    this.vm=vm;
    EventRequestManager mgr = vm.eventRequestManager();
    StepRequest request = mgr.createStepRequest(this.thread, StepRequest.STEP_LINE, StepRequest.STEP_OVER);
    request.setSuspendPolicy(EventRequest.SUSPEND_ALL);
    request.addCountFilter(1);
    request.enable();
}
 
开发者ID:DiegoArranzGarcia,项目名称:JavaTracer,代码行数:10,代码来源:ThreadTrace.java

示例7: doStep

import com.sun.jdi.request.StepRequest; //导入方法依赖的package包/类
/**
 *
 * @param suspendContext
 * @param stepThread
 * @param size the step size. One of {@link StepRequest#STEP_LINE} or {@link StepRequest#STEP_MIN}
 * @param depth
 * @param hint may be null
 */
protected void doStep(final SuspendContextImpl suspendContext, final ThreadReferenceProxyImpl stepThread, int size, int depth,
                      RequestHint hint) {
  if (stepThread == null) {
    return;
  }
  try {
    final ThreadReference stepThreadReference = stepThread.getThreadReference();
    if (LOG.isDebugEnabled()) {
      LOG.debug("DO_STEP: creating step request for " + stepThreadReference);
    }
    deleteStepRequests(stepThreadReference);
    EventRequestManager requestManager = getVirtualMachineProxy().eventRequestManager();
    StepRequest stepRequest = requestManager.createStepRequest(stepThreadReference, size, depth);
    if (!(hint != null && hint.isIgnoreFilters()) /*&& depth == StepRequest.STEP_INTO*/) {
      List<ClassFilter> activeFilters = getActiveFilters();

      if (!activeFilters.isEmpty()) {
        final String currentClassName = getCurrentClassName(stepThread);
        if (currentClassName == null || !DebuggerUtilsEx.isFiltered(currentClassName, activeFilters)) {
          // add class filters
          for (ClassFilter filter : activeFilters) {
            stepRequest.addClassExclusionFilter(filter.getPattern());
          }
        }
      }
    }

    // suspend policy to match the suspend policy of the context:
    // if all threads were suspended, then during stepping all the threads must be suspended
    // if only event thread were suspended, then only this particular thread must be suspended during stepping
    stepRequest.setSuspendPolicy(Registry.is("debugger.step.resumes.one.thread") ? EventRequest.SUSPEND_EVENT_THREAD
                                                                                 : suspendContext.getSuspendPolicy());

    if (hint != null) {
      //noinspection HardCodedStringLiteral
      stepRequest.putProperty("hint", hint);
    }
    stepRequest.enable();
  }
  catch (ObjectCollectedException ignored) {

  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:52,代码来源:DebugProcessImpl.java


注:本文中的com.sun.jdi.request.StepRequest.enable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。