Actually made debug mode work.

Also added a make target that automatically fetches submodules.
This will not work in a file that isn't a git checkout, which is
something to fix later on.