only prep debug when debug enabled
Merge pull request #236 from flightjs/debug_for_debug

only prep debug when debug enabled