The best way to debug a program is to make it work.
Mathematics is not a careful march down a well-cleared highway, but a journey into a strange wilderness, where the explorers often get lost.