Best way to debug plotly events

What is the best way to debug plotly events ?
I have some issues with plotly scatter maps where I update a figure by adding a trace and also adjust the zoom and center of the map. This does not always works the way I expect it to work.
I assume this has to do with the way events are handled (may be not always in the correct order ?).
I would like to see the events in both the python and the javascript part.