Can I know debug/release app launched? I want do t...
# kotlin-native
a
Can I know debug/release app launched? I want do to something like
Copy code
if (isDebug) println("we a here")
Maybe write something in
build.gradle.kts
?
a
I think it can be done a platform-specific way, like in this iOS example.
a
Throwable().getStackTrace()
in Debug:
Copy code
kotlin.Throwable.<init>()kotlin.Throwable
<My stack trace>
Konan_start
Init_and_run_start
start
0x0
in Release:
Copy code
start
0x0
Is it a good idea to use it?
a
You mean, the presence of the debug information? I’m not sure it is a good idea as far as there is a compiler option to enable it for release build(see here).
a
For my target (don’t write debug log in release mode) it’s OK - when DSYM in release mode is on - normal to see debug log.