File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
adapter/src/main/kotlin/org/javacs/ktda Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -182,18 +182,19 @@ class KotlinDebugAdapter(
182
182
}
183
183
184
184
override fun attach (args : Map <String , Any >) = async.execute {
185
- performInitialization()
185
+ // Fix a deadlock problem by commenting the following line.
186
+ // performInitialization()
186
187
187
188
val projectRoot = (args[" projectRoot" ] as ? String )?.let { Paths .get(it) }
188
189
? : throw missingRequestArgument(" launch" , " projectRoot" )
189
190
190
191
val hostName = (args[" hostName" ] as ? String )
191
192
? : throw missingRequestArgument(" attach" , " hostName" )
192
193
193
- val port = (args[" port" ] as ? Int )
194
+ val port = (args[" port" ] as ? Double )?.toInt( )
194
195
? : throw missingRequestArgument(" attach" , " port" )
195
196
196
- val timeout = (args[" timeout" ] as ? Int )
197
+ val timeout = (args[" timeout" ] as ? Double )?.toInt( )
197
198
? : throw missingRequestArgument(" attach" , " timeout" )
198
199
199
200
setupCommonInitializationParams(args)
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ class JDILauncher(
70
70
}
71
71
72
72
private fun createAttachConnector (): AttachingConnector = vmManager.attachingConnectors()
73
- .firstOrNull()
73
+ .first { it.name().equals( " com.sun.jdi.SocketAttach " ) }
74
74
? : throw KotlinDAException (" Could not find an attaching connector (for a new debuggee VM)" )
75
75
76
76
private fun createLaunchConnector (): LaunchingConnector = vmManager.launchingConnectors()
You can’t perform that action at this time.
0 commit comments