When troubleshooting bugs, the best method is to remove unknowns until a minimal system can run and then go back and add pieces one as a time to deal with new problems alone instead of assembling everything at once and then trying to debug.
This is true for both hardware and software. If you build software up on an always working solid before adding the next piece, it will go easier and quicker.