Console.log output in iWebInspector

I am trying to get console.log () calls to work with a remote debugging tool (using iWebInspector or Safari) and PhoneGap 1.4.1.

Somehow console calls only appear in Xcode, it looks like the phone book is somehow setting up the console method.

Any idea how I can make it work?

+4
source share
2 answers

Use "FireBug" (for Firefox, Chrome, IE), Firefox, or Chrome. "console" is a JavaScript object present only in some browsers.

0
source

in the old 1.4.1 phone saver on an iOS phone used to capture the console.log object and redirect it to the xcode console.

if you want to change this code, you can include this code:

var old_log = console.log; console.log = function(txt){ //do something with log... if(old_log != null && typeof old_log == "function"){ old_log(txt); } }; 
0
source

Source: https://habr.com/ru/post/1403220/


All Articles