# How to disable DebugMetadata annotation about kotlin.coroutines?

**URL:** <https://discuss.kotlinlang.org/t/how-to-disable-debugmetadata-annotation-about-kotlin-coroutines/11933>\
**Category:** Support\
**Created:** [March 12, 2019, 11:56am UTC](https://discuss.kotlinlang.org/t/how-to-disable-debugmetadata-annotation-about-kotlin-coroutines/11933 "2019-03-12T11:56:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lymoge](https://avatars.discourse-cdn.com/v4/letter/l/f04885/32.png) [@lymoge](https://discuss.kotlinlang.org/u/lymoge)\
**Post date:** [March 12, 2019, 11:56am UTC](https://discuss.kotlinlang.org/t/how-to-disable-debugmetadata-annotation-about-kotlin-coroutines/11933/1 "2019-03-12T11:56:28Z")

</div>

There is a `kotlin.coroutines.jvm.internal.DebugMetadata` annotation on each class that contains coroutines, the meta data stored on this annotation is useless after class file obfuscated by proguard, and the information of original class file are leaked.

---

<div class="post-metadata">

**Author:** ![pdvrieze](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/pdvrieze/32/1882_2.png) [@pdvrieze](https://discuss.kotlinlang.org/u/pdvrieze)\
**Post date:** [March 18, 2019, 2:56pm UTC](https://discuss.kotlinlang.org/t/how-to-disable-debugmetadata-annotation-about-kotlin-coroutines/11933/2 "2019-03-18T14:56:31Z")

</div>

If you do obfuscation (like with Proguard) you can have the tool strip the annotation. Proguard can certainly do it. And it is “valid” as the code is not designed for development anyway.

---

<div class="post-metadata">

**Author:** ![lymoge](https://avatars.discourse-cdn.com/v4/letter/l/f04885/32.png) [@lymoge](https://discuss.kotlinlang.org/u/lymoge)\
**Post date:** [March 19, 2019, 2:52am UTC](https://discuss.kotlinlang.org/t/how-to-disable-debugmetadata-annotation-about-kotlin-coroutines/11933/3 "2019-03-19T02:52:57Z")

</div>

This annotation is inlined and invoked at `kotlin.coroutines.jvm.internal.SuspendLambda#toString`, and there is no way to remove toString() method of subclass with Proguard.

---

<div class="post-metadata">

**Author:** ![oliver-jonas](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/oliver-jonas/32/8400_2.png) [@oliver-jonas](https://discuss.kotlinlang.org/u/oliver-jonas)\
**Post date:** [March 10, 2021, 1:11pm UTC](https://discuss.kotlinlang.org/t/how-to-disable-debugmetadata-annotation-about-kotlin-coroutines/11933/4 "2021-03-10T13:11:28Z")

</div>

I’ve created ‘unmeta’, an Android Gradle plug-in that removes all Kotlin @Metadata and @DebugMetadata annotations for release builds.

You can find it here: [GitHub - oliver-jonas/unmeta: An Android Gradle plugin to remove all Kotlin Metadata annotations from the build output.](https://github.com/oliver-jonas/unmeta)

It uses ASM and operates directly on the compiled bytecode.
