Find and register the component that caused solution

I run a rather complex script with several dynamic inputs (dynamic pipelines, explicit conversion from guid to geometry, layer table lookup, etc).

Sometimes I find it a bit tricky to figure out what part of the script was part of/updated in the last solution.

I have looked at the GH_DocumentObject.SolutionExpired event, but not really sure whether I need to recursively subscribe to the event of all objects on the canvas?

I’m relatively new to event handling, so forgive me if the solution is right in front of me. But how would you best find out what components caused the last solution?