It depends on how far you want to go with those. Installing -dbg packages only is insufficient for a lot of cases (as many/most packages don't build them), but is "safe" in the sense that they will always stay installable and upgradeable. Using -dbgsym isn't, due to the hackish and convoluted way that we (have to) use to build the ddebs archive. I would _not_ recommend to permanently install those.
Instead, what I recommend is to install apport-retrace and if you have a crash, use it to debug a .crash file in a temporary sandbox (-S system) which will include all available dbgsyms, not only for the transitive dependencies of a package, but also from the dynamically loaded plugins of the program.
What's the purpose of the script, i. e. in which cases would you run this? Is that an use case which should be supported by apport-retrace?
It depends on how far you want to go with those. Installing -dbg packages only is insufficient for a lot of cases (as many/most packages don't build them), but is "safe" in the sense that they will always stay installable and upgradeable. Using -dbgsym isn't, due to the hackish and convoluted way that we (have to) use to build the ddebs archive. I would _not_ recommend to permanently install those.
Instead, what I recommend is to install apport-retrace and if you have a crash, use it to debug a .crash file in a temporary sandbox (-S system) which will include all available dbgsyms, not only for the transitive dependencies of a package, but also from the dynamically loaded plugins of the program.
What's the purpose of the script, i. e. in which cases would you run this? Is that an use case which should be supported by apport-retrace?