Is there a way to emit the `debugger` statement to...
# javascript
p
Is there a way to emit the
debugger
statement to final compiled JS code? That would help to debug the compiled code in browser dev tools tremendously..
j
js("debugger;")
?
šŸ‘ 1
p
It is that simple? šŸ¤¦ā€ā™‚ļø
That works great from js module, but can it be done from common module in KMP?
d
For full syntactic sugar (I think this would work, haven't checked):
Copy code
expect val debugger: Unit

// other platforms
actual val debugger: Unit get() = Unit

// js
actual val debugger: dynamic get() = js("debugger;")
ā˜ļø 1
p
I see, that is clever hack šŸ™‚
works like a charm, thank you šŸ‘