|
48 | 48 | import com.sun.jdi.StackFrame; |
49 | 49 | import com.sun.jdi.ThreadReference; |
50 | 50 | import com.sun.jdi.Value; |
51 | | -import com.sun.jdi.VMDisconnectedException; |
52 | 51 | import com.sun.jdi.VoidValue; |
53 | 52 | import com.sun.jdi.event.BreakpointEvent; |
54 | 53 | import com.sun.jdi.event.Event; |
@@ -113,16 +112,8 @@ public CompletableFuture<Response> handle(Command command, Arguments arguments, |
113 | 112 | threadState.pendingStepRequest = DebugUtility.createStepOverRequest(thread, null); |
114 | 113 | } |
115 | 114 |
|
116 | | - if (context.getDebugSession().suspendAllThreads()) { |
117 | | - threadState.pendingStepRequest.setSuspendPolicy(EventRequest.SUSPEND_ALL); |
118 | | - } |
119 | | - |
120 | 115 | threadState.pendingMethodExitRequest = thread.virtualMachine().eventRequestManager().createMethodExitRequest(); |
121 | | - if (context.getDebugSession().suspendAllThreads()) { |
122 | | - threadState.pendingMethodExitRequest.setSuspendPolicy(EventRequest.SUSPEND_ALL); |
123 | | - } else { |
124 | | - threadState.pendingMethodExitRequest.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD); |
125 | | - } |
| 116 | + threadState.pendingMethodExitRequest.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD); |
126 | 117 |
|
127 | 118 | threadState.targetStepIn = targetId > 0 |
128 | 119 | ? (MethodInvocation) context.getRecyclableIdPool().getObjectById(targetId) : null; |
@@ -198,15 +189,7 @@ public CompletableFuture<Response> handle(Command command, Arguments arguments, |
198 | 189 | } |
199 | 190 |
|
200 | 191 | context.getThreadCache().removeEventThread(thread.uniqueID()); |
201 | | - if (context.getDebugSession().suspendAllThreads()) { |
202 | | - try { |
203 | | - context.getDebugSession().resume(); |
204 | | - } catch (VMDisconnectedException e) { |
205 | | - // ignore |
206 | | - } |
207 | | - } else { |
208 | | - DebugUtility.resumeThread(thread); |
209 | | - } |
| 192 | + DebugUtility.resumeThread(thread); |
210 | 193 | ThreadsRequestHandler.checkThreadRunningAndRecycleIds(thread, context); |
211 | 194 | } catch (IncompatibleThreadStateException ex) { |
212 | 195 | // Roll back the Exception info if stepping fails. |
@@ -327,9 +310,7 @@ private void handleDebugEvent(DebugEvent debugEvent, IDebugSession debugSession, |
327 | 310 | threadState.eventSubscription.dispose(); |
328 | 311 | } |
329 | 312 | context.getThreadCache().addEventThread(thread, "step"); |
330 | | - boolean allThreadsStopped = event.request() != null |
331 | | - && event.request().suspendPolicy() == EventRequest.SUSPEND_ALL; |
332 | | - context.getProtocolServer().sendEvent(new Events.StoppedEvent("step", thread.uniqueID(), allThreadsStopped)); |
| 313 | + context.getProtocolServer().sendEvent(new Events.StoppedEvent("step", thread.uniqueID())); |
333 | 314 | debugEvent.shouldResume = false; |
334 | 315 | } else if (event instanceof MethodExitEvent) { |
335 | 316 | MethodExitEvent methodExitEvent = (MethodExitEvent) event; |
|
0 commit comments