2

I am using Opera on a Windows PC and developing for a device. I can telnet into the device and manually run the browser which gives me the browser output.

Is it possible to trace messages into both Dragonfly and the Opera console? I can see a window.alert() message show up in the console, but I would also like to trace messages for simpler debugging and status tracking both within Dragonfly on PC and Opera on the device.

Kara
  • 6,115
  • 16
  • 50
  • 57
Jeremy White
  • 2,818
  • 6
  • 38
  • 74

2 Answers2

3
function debug(text) {
  ((window.console && console.log) ||
   (window.opera && opera.postError) ||
   window.alert).call(this, text);
}

I'm not positive this will solve your problems (I don't have much experience with Dragonfly) but it seems that opera.postError is the general API call for console logging on Opera.

Anthony Mills
  • 8,676
  • 4
  • 32
  • 51
  • 1
    postError() might throw a "WRONG_THIS_ERROR" with that code.. but that was considered a bug and I hope we never released any versions with this issue.. – hallvors Dec 07 '10 at 06:36
2

console.log will work in Opera and Dragonfly from Opera 11. We added support for both the Console and the Command Line APIs from Firebug. See http://my.opera.com/dragonfly/blog/getting-opera-dragonfly-ready-for-opera-11/ for more information.

Lyth
  • 2,171
  • 2
  • 29
  • 37
David Storey
  • 29,166
  • 6
  • 50
  • 60