I’m little bit experimenting with Kotlin2js and node.js.
I wonder if it’s possible to enable debugging directly within Kotlin code, so far I’m getting only JavaScript debugger to work on transpiled code.
I know that there are source code maps generated and it works for example in Chrome debugger on browser side.
I’m compiling Kotlin code with Gradle plugin, then starting Node.js in debug mode and starting remote debug of Node.js pointing to the server.
Ok, small update. I managed to get it to at least jump into Kotlin code.
The main problem was probably in wrong working directory in debug configuration and now I’m using IntelliJ node.js run/debug configruation (not remote Node.js debugging).
Breakpoints work only in JavaScript code, but with Step Into I can actually step in Kotlin code. Breakpoints are still not working for me in the Kotlin code. At least I can debug in the transpiled code.