Closed MrRogerHuang closed 3 years ago
Additionally, I can use IntelliJ IDEA Community 2020.1 to open the kotlin-quick-start project and to use its debugger to successfully attach to the program run by the same command!
java -agentlib:jdwp=transport=dt_socket,server=y,address=12345,suspend=y -jar .\build\libs\kotlin-quick-start-0.1.1.jar
This is my dev environment: Windows 10 2004 64-bit VS Code: 1.46.0 vscode-kotlin: 0.2.14 Gradle: 6.4.1 OpenJDK: 11 64-bit
I use this repo for testing vscode-kotlin (forked from fwcd/kotlin-quick-start): https://github.com/MrRogerHuang/kotlin-quick-start
I run
./gradlew build
Then, I add and run vscode-kotlin's "Kotlin Launch" debug config. Fortunately, it works well. vscode-kotlin successfully stopped at a breakpoint in Main.kt file.However, unfortunately, vscode-kotlin's "Kotlin Attach" debug config doesn't work. I start MainKt with this command line:
java -agentlib:jdwp=transport=dt_socket,server=y,address=12345,suspend=y -jar .\build\libs\kotlin-quick-start-0.1.1.jar
This is the "Kotlin Attach" part in launch.json:When I run "Kotlin Attach" config, I get this error in VS Code DEBUG CONSOLE:
I do specify port argument in the config. Why does kotlin-debug-adapter say no?