How to debug the code?

That would be more than tedious, I agree.