Android Studio and Kotlin - Set breakpoint at runtime in a suspend function doesn't work
Asked Answered
S

0

7

In my Android app developed in Kotlin I'm not able to make the debugger stop on breakpoints set at runtime in a Dynamic Feature with suspend functions. If I set the breakpoint before launching the app it works, but when I try to set the same breakpoint at runtime it doesn't, the debugger simply keeps skipping the breakpoints. I also checked "suspend all" in the breakpoint options to no avail, the debugger still skips the breakpoint. A very annoying situation because every time I need to pause the execution at a specific line in a suspend function, I must first stop the app, then set the breakpoint and then restart the app. Only in that case it works. On the contrary if I set a breakpoint in a no-suspend function, it works at runtime too. Any idea?

Soutane answered 7/12, 2020 at 9:56 Comment(1)
Jetbrains is aware of this issue. See youtrack.jetbrains.com/issue/KT-27810Epiphragm

© 2022 - 2024 — McMap. All rights reserved.