File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed
adapter/src/main/kotlin/org/javacs/ktda Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ class KotlinDebugAdapter(
100
100
config,
101
101
context
102
102
).also (::setupDebuggeeListeners)
103
+ LOG .trace(" Instantiated debuggee" )
103
104
}
104
105
105
106
private fun missingRequestArgument (requestName : String , argumentName : String ) =
@@ -133,12 +134,13 @@ class KotlinDebugAdapter(
133
134
eventBus.exceptionListeners.add {
134
135
sendStopEvent(it.threadID, StoppedEventArgumentsReason .EXCEPTION )
135
136
}
136
- stdoutAsync.run {
137
+ stdoutAsync.execute {
137
138
debuggee.stdout?.let { pipeStreamToOutput(it, OutputEventArgumentsCategory .STDOUT ) }
138
139
}
139
- stderrAsync.run {
140
+ stderrAsync.execute {
140
141
debuggee.stderr?.let { pipeStreamToOutput(it, OutputEventArgumentsCategory .STDERR ) }
141
142
}
143
+ LOG .trace(" Configured debuggee listeners" )
142
144
}
143
145
144
146
private fun pipeStreamToOutput (stream : InputStream , outputCategory : String ) {
Original file line number Diff line number Diff line change @@ -46,7 +46,10 @@ class JDIDebuggee(
46
46
stdout = process?.inputStream
47
47
stderr = process?.errorStream
48
48
49
+ LOG .trace(" Updating threads" )
49
50
updateThreads()
51
+
52
+ LOG .trace(" Updating breakpoints" )
50
53
hookBreakpoints()
51
54
}
52
55
Original file line number Diff line number Diff line change @@ -33,11 +33,14 @@ class JDILauncher(
33
33
override fun launch (config : LaunchConfiguration , context : DebugContext ): JDIDebuggee {
34
34
val connector = createLaunchConnector()
35
35
LOG .info(" Starting JVM debug session with main class {}" , config.mainClass)
36
- return JDIDebuggee (
37
- connector.launch(createLaunchArgs(config, connector)) ? : throw KotlinDAException (" Could not launch a new VM" ),
38
- sourcesRootsOf(config.projectRoot),
39
- context
40
- )
36
+
37
+ LOG .debug(" Launching VM" )
38
+ val vm = connector.launch(createLaunchArgs(config, connector)) ? : throw KotlinDAException (" Could not launch a new VM" )
39
+
40
+ LOG .debug(" Finding sourcesRoots" )
41
+ val sourcesRoots = sourcesRootsOf(config.projectRoot)
42
+
43
+ return JDIDebuggee (vm, sourcesRoots, context)
41
44
}
42
45
43
46
override fun attach (config : AttachConfiguration , context : DebugContext ): JDIDebuggee {
You can’t perform that action at this time.
0 commit comments