This report is about running console.log() in the browser. I've never had problems using it in PhoneGap.
--
Michael
If you happen to be using weinre, it intercepts console.log() requests,
so you won't see them in the usual place. It should only be doing this
while the debugger client is connected to a target, so you be able see
console output somewhere.
BTW, I'm planning on fixing my console.log() support to pass through the
messages to the original console, instead of overriding them.
--
Patrick Mueller - http://muellerware.org
// console.log in api level 7: http://developer.android.com/guide/developing/debug-tasks.html
@Override
public void onConsoleMessage(String message, int lineNumber, String sourceID)
{
// This is a kludgy hack!!!!
Log.d(TAG, sourceID + ": Line " + Integer.toString(lineNumber) + " : " + message);
}
On the HTC Evo, the breakpoint in onConsoleMessage never gets hit.
Also, I found further evidence on stackoverflow that there is a general problem with console.log, Android 2.2 and HTC devices.
For now, I'll stick to the Nexus One or Droid when I need console.log.