Is it possible to monitor a specific property and log WHY it changes?

In my application, i have a dmc.MultiSelect component. Sometimes, the component seems to “forget” its value. The value property changes from ["foo"] to [], and callbacks that have this property as an Input are triggered. I suspect that there is either a race condition between some of my callbacks, or there is a bug in the dmc.MultiSelect implementation.

What I tried: I am already logging the execution of all server-side callbacks together with their outputs and their triggering propery ids (via a monkey patch of dash.callback). I do not see any suspicious activity there.

What I would like to do:

  1. Log all client-side callbacks in a similar way.
  2. Monitor the vaule property of the MultiSelect directly, instead of the callbacks. I would like to get log entries like "The property changed from X to Y BECAUSE OF <server-side callback X / client-siede callback Y / internal JavaScript code of the component>.

Is it possible to implement somthing like 2?

Hi @Niklas_Kappel

Not sure about the logging question, but what version of DMC are you using? There was a fix for some race conditions like this in 2.4.1

1 Like