Skip to content

Commit 94dd93c

Browse files
committed
Set breakpoint suspend policy to only suspend the event thread
This fixes an issue where other threads are shown as running in the UI when they are actually suspended after hitting a user's breakpoint.
1 parent 75724c1 commit 94dd93c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

adapter/src/main/kotlin/org/javacs/ktda/jdi/JDIDebuggee.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ class JDIDebuggee(
139139
?.firstOrNull() ?: return false
140140
val request = vm.eventRequestManager()
141141
.createBreakpointRequest(location)
142-
request?.enable()
142+
?.apply {
143+
setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD)
144+
enable()
145+
}
143146
return request != null
144147
} catch (e: AbsentInformationException) {
145148
return false

0 commit comments

Comments
 (0)