The Cordova IsDebug plugin may be able to be used (https://www.npmjs.com/package/cordova-plugin-is-debug)