# Kotlin JS debug

**URL:** <https://discuss.kotlinlang.org/t/kotlin-js-debug/1664>\
**Category:** JavaScript\
**Created:** [May 13, 2016, 12:35pm UTC](https://discuss.kotlinlang.org/t/kotlin-js-debug/1664 "2016-05-13T12:35:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jean79](https://avatars.discourse-cdn.com/v4/letter/j/dbc845/32.png) [@jean79](https://discuss.kotlinlang.org/u/jean79)\
**Post date:** [May 13, 2016, 12:35pm UTC](https://discuss.kotlinlang.org/t/kotlin-js-debug/1664/1 "2016-05-13T12:35:59Z")

</div>

Hello,  
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](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?  
Thanks!  
Jan

---

<div class="post-metadata">

**Author:** ![bashor](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/bashor/32/1431_2.png) [@bashor](https://discuss.kotlinlang.org/u/bashor)\
**Post date:** [May 13, 2016, 3:41pm UTC](https://discuss.kotlinlang.org/t/kotlin-js-debug/1664/2 "2016-05-13T15:41:59Z")

</div>

Hi, Jan!

It’s [KT-4078](https://youtrack.jetbrains.com/issue/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).

---

<div class="post-metadata">

**Author:** ![jean79](https://avatars.discourse-cdn.com/v4/letter/j/dbc845/32.png) [@jean79](https://discuss.kotlinlang.org/u/jean79)\
**Post date:** [May 13, 2016, 7:42pm UTC](https://discuss.kotlinlang.org/t/kotlin-js-debug/1664/3 "2016-05-13T19:42:27Z")

</div>

Hi,  
Voted.  
Thanks!  
J.

---

<div class="post-metadata">

**Author:** ![BenLeggiero](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/benleggiero/32/2306_2.png) [@BenLeggiero](https://discuss.kotlinlang.org/u/BenLeggiero)\
**Post date:** [February 25, 2018, 8:04am UTC](https://discuss.kotlinlang.org/t/kotlin-js-debug/1664/4 "2018-02-25T08:04:24Z")

</div>

This is still happening to me in Kotlin 1.2.21

---

<div class="post-metadata">

**Author:** ![bashor](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/bashor/32/1431_2.png) [@bashor](https://discuss.kotlinlang.org/u/bashor)\
**Post date:** [February 26, 2018, 3:22pm UTC](https://discuss.kotlinlang.org/t/kotlin-js-debug/1664/5 "2018-02-26T15:22:41Z")

</div>

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