working on debug script to help with CS
Copied from !158 (closed) to source it from this repo instead.