This is a tedious thing to do. To be honest, debugging will take you many hours of figuring things out, especially when you're just starting out and don't know the code all that well. Trust me, it will take some time, but don't worry; it's worth the effort.
Let's take the app we've created, I sent it to a friend to test, and here is a snippet of the device log he lovingly sent to me:
Size (256.000000, 256.000000) 2015-06-11 21:24:04.357 Adesa[11289:1870205] Layer background has zPosition -60.000000 2015-06-11 21:24:04.363 Adesa[11289:1870205] Layer walls has zPosition -40.000000 2015-06-11 21:24:04.364 Adesa[11289:1870205] Layer hazards has zPosition -20.000000 2015-06-11 21:24:06.725 Adesa[11289:1870205] PEW 2015-06-11 21:24:21.971 Adesa[11289:1870205] PEW 2015-06-11 21:24:22.158 Adesa[11289:1870205] PEW 2015-06-11 21:24:22.391 Adesa[11289:1870205] PEW 2015-06-11 21:24:22.511 Adesa[11289:1870205] PEW 2015-06-11 21:24:22.911 Adesa[11289:1870205] PEW 2015-06-11 21:24:23...