add debug option to build scripts
Merge branch 'feature-20140824-crash-debug' into 20140401-dev-stable