Debug code lens using new resolveMain command in Kotlin-Language-Server #92
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uses fwcd/kotlin-language-server#345 to get information on the main method, so Kotlin-Debug-Adapter can be used to run or debug the code without creating launch.json files. Currently no persisting of these settings (to launch.json) are done, so this is a probable future improvement.
Regular main method:

Companion object main method:

You may wonder: What made me, a hardcore Emacs user do this stuff for VS Code? I have to admit I have a soft spot for VSCode, and TypeScript is fun. VSCode is also the editor I recommend to people starting out with coding, as I think it is one of the best editors that are not Emacs around. (Emacs is not for everyone, never will be probably, but the ability to choose what works best for you is great!). I'm by no means a pro in VSCode extension coding, so there are probably room for improvements 🙂
Same functionality for Emacs is in progress in lsp-mode for lsp-kotlin, but not pleased yet. Proof if you are curious 😛
https://github.com/themkat/lsp-mode/tree/kotlin_run_debug