add debug for phonegap