improve debug_tools