本文整理汇总了Java中com.sun.jdi.request.EventRequestManager.createThreadStartRequest方法的典型用法代码示例。如果您正苦于以下问题:Java EventRequestManager.createThreadStartRequest方法的具体用法?Java EventRequestManager.createThreadStartRequest怎么用?Java EventRequestManager.createThreadStartRequest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.jdi.request.EventRequestManager
的用法示例。
在下文中一共展示了EventRequestManager.createThreadStartRequest方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setEventRequests
import com.sun.jdi.request.EventRequestManager; //导入方法依赖的package包/类
private void setEventRequests(VirtualMachine vm) {
EventRequestManager erm = vm.eventRequestManager();
// Normally, we want all uncaught exceptions. We request them
// via the same mechanism as Commands.commandCatchException()
// so the user can ignore them later if they are not
// interested.
// FIXME: this works but generates spurious messages on stdout
// during startup:
// Set uncaught java.lang.Throwable
// Set deferred uncaught java.lang.Throwable
Commands evaluator = new Commands();
evaluator.commandCatchException
(new StringTokenizer("uncaught java.lang.Throwable"));
ThreadStartRequest tsr = erm.createThreadStartRequest();
tsr.enable();
ThreadDeathRequest tdr = erm.createThreadDeathRequest();
tdr.enable();
}
示例2: setEventRequests
import com.sun.jdi.request.EventRequestManager; //导入方法依赖的package包/类
private void setEventRequests(VirtualMachine vm) {
EventRequestManager erm = vm.eventRequestManager();
// Normally, we want all uncaught exceptions. We request them
// via the same mechanism as Commands.commandCatchException()
// so the user can ignore them later if they are not
// interested.
// FIXME: this works but generates spurious messages on stdout
// during startup:
// Set uncaught java.lang.Throwable
// Set deferred uncaught java.lang.Throwable
Commands evaluator = new Commands(env);
evaluator.commandCatchException
(new StringTokenizer("uncaught java.lang.Throwable"));
ThreadStartRequest tsr = erm.createThreadStartRequest();
tsr.enable();
ThreadDeathRequest tdr = erm.createThreadDeathRequest();
tdr.enable();
}
示例3: vmAttached
import com.sun.jdi.request.EventRequestManager; //导入方法依赖的package包/类
private void vmAttached() {
DebuggerManagerThreadImpl.assertIsManagerThread();
LOG.assertTrue(!isAttached());
if(myState.compareAndSet(STATE_INITIAL, STATE_ATTACHED)) {
final VirtualMachineProxyImpl machineProxy = getVirtualMachineProxy();
final EventRequestManager requestManager = machineProxy.eventRequestManager();
if (machineProxy.canGetMethodReturnValues()) {
myReturnValueWatcher = new MethodReturnValueWatcher(requestManager);
}
final ThreadStartRequest threadStartRequest = requestManager.createThreadStartRequest();
threadStartRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
threadStartRequest.enable();
final ThreadDeathRequest threadDeathRequest = requestManager.createThreadDeathRequest();
threadDeathRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
threadDeathRequest.enable();
myDebugProcessDispatcher.getMulticaster().processAttached(this);
// breakpoints should be initialized after all processAttached listeners work
ApplicationManager.getApplication().runReadAction(new Runnable() {
@Override
public void run() {
XDebugSession session = getSession().getXDebugSession();
if (session != null) {
session.initBreakpoints();
}
}
});
final String addressDisplayName = DebuggerBundle.getAddressDisplayName(getConnection());
final String transportName = DebuggerBundle.getTransportName(getConnection());
showStatusText(DebuggerBundle.message("status.connected", addressDisplayName, transportName));
if (LOG.isDebugEnabled()) {
LOG.debug("leave: processVMStartEvent()");
}
}
}
示例4: vmAttached
import com.sun.jdi.request.EventRequestManager; //导入方法依赖的package包/类
private void vmAttached() {
DebuggerManagerThreadImpl.assertIsManagerThread();
LOG.assertTrue(!isAttached());
if(myState.compareAndSet(STATE_INITIAL, STATE_ATTACHED)) {
final VirtualMachineProxyImpl machineProxy = getVirtualMachineProxy();
final EventRequestManager requestManager = machineProxy.eventRequestManager();
if (machineProxy.canGetMethodReturnValues()) {
myReturnValueWatcher = new MethodReturnValueWatcher(requestManager);
}
final ThreadStartRequest threadStartRequest = requestManager.createThreadStartRequest();
threadStartRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
threadStartRequest.enable();
final ThreadDeathRequest threadDeathRequest = requestManager.createThreadDeathRequest();
threadDeathRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
threadDeathRequest.enable();
DebuggerManagerEx.getInstanceEx(getProject()).getBreakpointManager().setInitialBreakpointsState();
myDebugProcessDispatcher.getMulticaster().processAttached(this);
final String addressDisplayName = DebuggerBundle.getAddressDisplayName(getConnection());
final String transportName = DebuggerBundle.getTransportName(getConnection());
showStatusText(DebuggerBundle.message("status.connected", addressDisplayName, transportName));
if (LOG.isDebugEnabled()) {
LOG.debug("leave: processVMStartEvent()");
}
}
}