https://kotlinlang.org logo
#coroutines
Title
# coroutines
v

voben

02/26/2021, 3:31 PM
Say you have a fragment that’s observing a stateflow in the viewmodel. How do you know what event triggered that change in state? Is the only way to know by setting breakpoints in the viewmodel everywhere where the stateflow gets updated?
w

wasyl

02/26/2021, 3:34 PM
Perhaps you could put a field watchpoint in the
MutableStateFlow#value
and look at the stacktrace?
I assume mean you want to debug the changes in the flow
v

voben

02/26/2021, 3:51 PM
Yes, to debug the changes
👍 1
3 Views