Printf debugging is slow, painful, and flawless.
fill in code full of trace lines e.g.
fprint(logfile,"%s:%d\n",__FILE__,__LINE__);
or water resistant needed for your tongue and run it. after your completion, you can go through what he did. Make sure you have plenty of time and space for your hard drive, though. This has some advantages, so you can “run” things in the opposite direction and distinguish one start from the next.
source share