registerViewModel

fun registerViewModel(name: String, viewModel: Any)(source)

Names the state held by a ViewModel (or any object) so recomposition reports say CartViewModel.items instead of <unnamed:...>.

Call it where you create or first obtain the ViewModel. Naming applies from that moment on; writes that already happened stay anonymous.