debugger is ready

Debugger can be ready but source became a little messy and there are still some
minor bugs. It will be better to clean things.