Adding console log to functions lets you see if they are running properly. I tried this within Firebug first.
Later I added console log to the functions in my code. Since everything’s running fine on this one, the console window looks like this.
PhoneGap consists of two code bases: native and JavaScript. While the native code is loading, a custom loading image is displayed. However, JavaScript is only loaded once the DOM loads. This means your web application could, potentially, call a PhoneGap JavaScript function before it is loaded.
The PhoneGap deviceready
event fires once PhoneGap has fully loaded. After the device has fired, you can safely make calls to PhoneGap function. Here is a screenshot of the console window showing all device information (this is running on a system editor)