File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
adapter/src/main/kotlin/org/javacs/ktda Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,8 @@ class KotlinDebugAdapter(
271271 exceptionsPool.clear()
272272 converter.variablesPool.clear()
273273 converter.stackFramePool.removeAllOwnedBy(args.threadId)
274- (debuggee as JDIDebuggee ).resumeVm()
274+ // See the issue: https://github.com/fwcd/kotlin-debug-adapter/pull/40
275+ debuggee?.resumeVm()
275276 }
276277 ContinueResponse ().apply {
277278 allThreadsContinued = false
@@ -354,6 +355,7 @@ class KotlinDebugAdapter(
354355 override fun source (args : SourceArguments ): CompletableFuture <SourceResponse > = notImplementedDAPMethod()
355356
356357 override fun threads () = async.compute { onceDebuggeeIsPresent { debuggee ->
358+ debuggee.updateThreads()
357359 ThreadsResponse ().apply {
358360 threads = debuggee.threads
359361 .asSequence()
Original file line number Diff line number Diff line change @@ -17,7 +17,11 @@ interface Debuggee {
1717 get() = null
1818
1919 fun exit ()
20-
20+
21+ fun resumeVm ()
22+
23+ fun updateThreads ()
24+
2125 fun threadByID (id : Long ): DebuggeeThread ? = threads
2226 .asSequence()
2327 .filter { it.id == id }
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ class JDIDebuggee(
5454 hookBreakpoints()
5555 }
5656
57- private fun updateThreads () = threads.setAll(vm.allThreads().map { JDIThread (it, this ) })
57+ override fun updateThreads () = threads.setAll(vm.allThreads().map { JDIThread (it, this ) })
5858
5959 private fun hookBreakpoints () {
6060 context.breakpointManager.also { manager ->
@@ -134,7 +134,7 @@ class JDIDebuggee(
134134 }
135135 }
136136
137- fun resumeVm () {
137+ override fun resumeVm () {
138138 vm.resume()
139139 }
140140
You can’t perform that action at this time.
0 commit comments