File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed
src/main/kotlin/org/javacs/ktda/adapter Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ startScripts {
1515
1616dependencies {
1717 // The JSON-RPC and Debug Adapter Protocol implementations
18- implementation ' org.eclipse.lsp4j:org.eclipse.lsp4j.debug:0.12 .0'
18+ implementation ' org.eclipse.lsp4j:org.eclipse.lsp4j.debug:0.15 .0'
1919 implementation ' org.jetbrains.kotlin:kotlin-stdlib'
2020 implementation ' org.jetbrains.kotlin:kotlin-reflect'
2121 implementation(' kotlin-language-server:shared' ) {
Original file line number Diff line number Diff line change @@ -74,6 +74,12 @@ class DAPConverter(
7474 line = lineConverter.toExternalLine(internalBreakpoint.position.lineNumber)
7575 isVerified = true
7676 }
77+
78+ fun toDAPBreakpoint (internalBreakpoint : InternalExceptionBreakpoint ) = DAPBreakpoint ().apply {
79+ id = internalBreakpoint.id.toInt()
80+ message = internalBreakpoint.label
81+ isVerified = true
82+ }
7783
7884 fun toInternalStackFrame (frameId : Long ) = stackFramePool.getByID(frameId)
7985
Original file line number Diff line number Diff line change @@ -80,8 +80,6 @@ class KotlinDebugAdapter(
8080 LOG .info(" Connected to client" )
8181 }
8282
83- override fun runInTerminal (args : RunInTerminalRequestArguments ): CompletableFuture <RunInTerminalResponse > = notImplementedDAPMethod()
84-
8583 override fun configurationDone (args : ConfigurationDoneArguments ? ): CompletableFuture <Void > {
8684 LOG .trace(" Got configurationDone request" )
8785 val response = CompletableFuture <Void >()
@@ -276,11 +274,15 @@ class KotlinDebugAdapter(
276274
277275 override fun setFunctionBreakpoints (args : SetFunctionBreakpointsArguments ): CompletableFuture <SetFunctionBreakpointsResponse > = notImplementedDAPMethod()
278276
279- override fun setExceptionBreakpoints (args : SetExceptionBreakpointsArguments ) = async.execute {
280- args.filters
277+ override fun setExceptionBreakpoints (args : SetExceptionBreakpointsArguments ) = async.compute {
278+ val internalBreakpoints = args.filters
281279 .map(converter::toInternalExceptionBreakpoint)
282280 .toSet()
283- .let (context.breakpointManager.exceptionBreakpoints::setAll)
281+ internalBreakpoints.let (context.breakpointManager.exceptionBreakpoints::setAll)
282+
283+ SetExceptionBreakpointsResponse ().apply {
284+ breakpoints = internalBreakpoints.map(converter::toDAPBreakpoint).toTypedArray()
285+ }
284286 }
285287
286288 override fun continue_ (args : ContinueArguments ) = async.compute {
You can’t perform that action at this time.
0 commit comments