use of com.sun.jdi.request.ThreadStartRequest in project jdk8u_jdk by JetBrains.
the class VMConnection method setEventRequests.
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();
}
use of com.sun.jdi.request.ThreadStartRequest in project intellij-community by JetBrains.
the class DebugProcessEvents method vmAttached.
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();
// fill position managers
((DebuggerManagerImpl) DebuggerManager.getInstance(getProject())).getCustomPositionManagerFactories().map(factory -> factory.fun(this)).filter(Objects::nonNull).forEach(this::appendPositionManager);
Stream.of(Extensions.getExtensions(PositionManagerFactory.EP_NAME, getProject())).map(factory -> factory.createPositionManager(this)).filter(Objects::nonNull).forEach(this::appendPositionManager);
myDebugProcessDispatcher.getMulticaster().processAttached(this);
createStackCapturingBreakpoints();
// breakpoints should be initialized after all processAttached listeners work
ApplicationManager.getApplication().runReadAction(() -> {
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));
LOG.debug("leave: processVMStartEvent()");
}
}
Aggregations