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 {
15
15
16
16
dependencies {
17
17
// 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'
19
19
implementation ' org.jetbrains.kotlin:kotlin-stdlib'
20
20
implementation ' org.jetbrains.kotlin:kotlin-reflect'
21
21
implementation(' kotlin-language-server:shared' ) {
Original file line number Diff line number Diff line change @@ -74,6 +74,12 @@ class DAPConverter(
74
74
line = lineConverter.toExternalLine(internalBreakpoint.position.lineNumber)
75
75
isVerified = true
76
76
}
77
+
78
+ fun toDAPBreakpoint (internalBreakpoint : InternalExceptionBreakpoint ) = DAPBreakpoint ().apply {
79
+ id = internalBreakpoint.id.toInt()
80
+ message = internalBreakpoint.label
81
+ isVerified = true
82
+ }
77
83
78
84
fun toInternalStackFrame (frameId : Long ) = stackFramePool.getByID(frameId)
79
85
Original file line number Diff line number Diff line change @@ -80,8 +80,6 @@ class KotlinDebugAdapter(
80
80
LOG .info(" Connected to client" )
81
81
}
82
82
83
- override fun runInTerminal (args : RunInTerminalRequestArguments ): CompletableFuture <RunInTerminalResponse > = notImplementedDAPMethod()
84
-
85
83
override fun configurationDone (args : ConfigurationDoneArguments ? ): CompletableFuture <Void > {
86
84
LOG .trace(" Got configurationDone request" )
87
85
val response = CompletableFuture <Void >()
@@ -276,11 +274,15 @@ class KotlinDebugAdapter(
276
274
277
275
override fun setFunctionBreakpoints (args : SetFunctionBreakpointsArguments ): CompletableFuture <SetFunctionBreakpointsResponse > = notImplementedDAPMethod()
278
276
279
- override fun setExceptionBreakpoints (args : SetExceptionBreakpointsArguments ) = async.execute {
280
- args.filters
277
+ override fun setExceptionBreakpoints (args : SetExceptionBreakpointsArguments ) = async.compute {
278
+ val internalBreakpoints = args.filters
281
279
.map(converter::toInternalExceptionBreakpoint)
282
280
.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
+ }
284
286
}
285
287
286
288
override fun continue_ (args : ContinueArguments ) = async.compute {
You can’t perform that action at this time.
0 commit comments