Skip to content

Commit 75724c1

Browse files
committed
Resume all threads if single thread is unsuccessful
1 parent 2190599 commit 75724c1

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

adapter/src/main/kotlin/org/javacs/ktda/adapter/KotlinDebugAdapter.kt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,14 +284,23 @@ class KotlinDebugAdapter(
284284
}
285285

286286
override fun continue_(args: ContinueArguments) = async.compute {
287-
val success = debuggee!!.threadByID(args.threadId)?.resume()
288-
if (success ?: false) {
287+
var success = debuggee!!.threadByID(args.threadId)?.resume() ?: false
288+
var allThreads = false
289+
290+
if (!success) {
291+
debuggee!!.resume()
292+
success = true
293+
allThreads = true
294+
}
295+
296+
if (success) {
289297
exceptionsPool.clear()
290298
converter.variablesPool.clear()
291299
converter.stackFramePool.removeAllOwnedBy(args.threadId)
292300
}
301+
293302
ContinueResponse().apply {
294-
allThreadsContinued = false
303+
allThreadsContinued = allThreads
295304
}
296305
}
297306

0 commit comments

Comments
 (0)