https://kotlinlang.org logo
#webassembly
Title
# webassembly
d

Darryl Miles

03/15/2024, 12:54 AM
Are there debug support functions ? Gradle options to enable development output ? WASM source maps ? just getting an original source file name and line number would help.
a

Artem Kobzar

03/15/2024, 10:48 AM
Hey, we generate source-map files by default, but for right now you need a small script to make it works with your Chrome DevTools debugger: https://github.com/Kotlin/kotlin-wasm-examples/blob/main/browser-example/build.gradle.kts#L19 By default we don't serve your sources as static files by Webpack Devserver, so you need to setup it by yourself to give access to your source files for Chrome DevTools
d

Darryl Miles

03/15/2024, 5:12 PM
Thanks for the reply, which Gradle build target produces the *.map data ? I am looking to understand what is available/missing, but the debugging needs to be available in an externally deployable form (outside of the gradle HMR/webpack tasks such as
wasmJsBrowserRun
or similar)
a

Artem Kobzar

03/18/2024, 8:37 AM
:compile[Development|Production]ExecutableKotlinWasmJs
👍 1
2 Views