The widespread adoption of Modelling and Simulation (M&S) techniques hinges on the availability of tools supporting each phase in the M&S-based workflow. This includes tasks such as specifying, implementing, experimenting with, as well as debugging simulation models. We have previously developed a technique where advanced debugging environments are generated from an explicit behavioural model of the user interface and the simulator. These models are extracted from the code of existing modelling environments and simulators, and instrumented with debugging operations. This technique can be reused for a large family of modelling formalisms, but was not yet considered for dynamic-structure formalisms; debugging models in these formalisms is challenging, as entities can appear and disappear during simulation. In this paper, we adapt and apply our approach to accommodate dynamic-structure formalisms. To this end, we present a modular, reusable approach, which includes an architecture and a workflow. We observe that to effectively debug dynamic-structure models, domain-specific visualizations developed by the modeller should be (re)used for debugging tasks. To demonstrate our technique, we use Dynamic-Structure DEVS (DSDEVS) (a formalism that includes the characteristics of discrete-event and agent-based modelling paradigms) and an implementation of its simulation semantics in the PythonPDEVS tool as a running example. We apply our technique on NetLogo, a popular multi-agent simulation tool, to demonstrate the generality of our approach.