Common debug utility