Kotlin JS debug


how can I debug Kotlin code running in a Chrome?
I have enabled “Generate source maps” and created Run/Debug configuration: JavaScript Debug.

I see my-app.js.map file generated, kotlin code files get copyied into the web folder where is generated javascript file.

However when I run debug and Idea get successfully connected to Chrome idea plugin, I got these errors in chrome console:
http://localhost:8080/myapp/js/app/file:/C:/development/git/PATH_TO/smartgrid.kt 404 (Not Found)

  • in chrome debugger all kt files are empty.

And my breakpoints in Idea don’t get ticked and do not work.

I assume I should somehow set some directories mapping?


Hi, Jan!

It’s KT-4078, feel free to vote to get updates.

You can workaround it by open Your html directly form FS or make all path relative in my-app.js.map file (by removing wrong suffix).




This is still happening to me in Kotlin 1.2.21


Could you please clarify your case? With an instruction to reproduce if possible.