move debug modules to debug.py