get debug semi-working