本文整理汇总了Java中com.sun.jdi.request.StepRequest.addCountFilter方法的典型用法代码示例。如果您正苦于以下问题:Java StepRequest.addCountFilter方法的具体用法?Java StepRequest.addCountFilter怎么用?Java StepRequest.addCountFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.jdi.request.StepRequest
的用法示例。
在下文中一共展示了StepRequest.addCountFilter方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
}
示例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.";
}
示例3: createStepRequest
import com.sun.jdi.request.StepRequest; //导入方法依赖的package包/类
private static StepRequest createStepRequest(ThreadReference thread, int stepSize, int stepDepth, String[] stepFilters) {
StepRequest request = thread.virtualMachine().eventRequestManager().createStepRequest(thread, stepSize, stepDepth);
if (stepFilters != null) {
for (String stepFilter : stepFilters) {
request.addClassExclusionFilter(stepFilter);
}
}
request.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
request.addCountFilter(1);
return request;
}
示例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;
}
示例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.";
}
示例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();
}