3

Is there a way to view the iphone console logs without having a mac ?

It used to be possible using the iPhone Configuration Utility but it does not seem to be available any longer. I saw a tool called iTools but it seems to require a 32bit version of itunes which is also not available any more.

Given an iPhone device + windows + linux, Is there any workaround / tool to view the iphone console logs?

epeleg
  • 10,347
  • 17
  • 101
  • 151
  • See http://stackoverflow.com/questions/28230292/iphone-configuration-utility-failed-to-locate-apple-mobile-device-support/28886881#28886881 – Seva Alekseyev Dec 05 '15 at 18:34

2 Answers2

4

Realizing it is over half a year ago you asked this, but since it does not have an accepted answer yet:

I ran into this very same issue over and over, and got fed up with it, so I decided to have a go at writing a script that displays console messages in HTML, so you can just view everything in the webpage itself, without having to resort to a console-replacement or a tedious remote debugger (for which you, indeed, require a Mac), without having to modify each console call in existing code.

The key lies in 'replacing' the four main functions in window.console: log, warn, error and trace. This is done by redifining each method, adding own code to that, and calling the original method in the end. Jakub Fiala wrote the basic script for that, on which I built the rest: https://gist.github.com/jakubfiala/8fe3461ab6508f46003d

I dubbed it 'MobileConsole'. It is quite unobtrusive and will 'catch' all console.log (or .warn, .error or .trace) events, and even bind to window.onerror.

I have created a separate page for this script with an elaborate explanation on how it works, including a demo, over here.

Ferares
  • 702
  • 5
  • 13
Klaas Leussink
  • 2,208
  • 16
  • 23
  • A link to a potential solution is always welcome, but please [add context around the link](//meta.stackoverflow.com/a/8259/169503) so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline. Take into account that being _barely more than a link to an external site_ is a possible reason as to [Why and how are some answers deleted?](//stackoverflow.com/help/deleted-answers). – Mogsdad May 17 '16 at 23:22
  • Thank you for your feedback. To my opinion, the context around the link was already quite clear, but I have rewritten the post to elaborate on it even further. Strictly speaking, my post doesn't **contain** an answer, but adding that code to the post would make it unreadable (623 lines of code), and risking someone, stumbling upon this in a few months, copying outdated code. Hope you understand. – Klaas Leussink May 18 '16 at 07:27
  • thanks for taking the time to add this suggestion. I am actually using similar stuff myself also there is winere which you can use as an even more comprehensive tool. Unfortunately it does not meet my needs because I wanted to be able to see the iphone's own console output (e.g. for debugging installation problems). – epeleg May 18 '16 at 13:25
  • Oh I see, you mean the iPhone's system logs, not Safari Mobile's console. Then, my stuff is not of much use :) – Klaas Leussink May 18 '16 at 13:28
  • An issue I've found with this script is that for some reason it breaks any import of an ES module that you make, so I ended up using alerts to debug. Really nice tool nonetheless – Ferares Aug 22 '22 at 11:19
  • That's weird. I recently made a v2 version (a complete rewrite), perhaps that one works better? See https://code.hnldesign.nl/demo/hnl.MobileConsole.v2.html – Klaas Leussink Aug 22 '22 at 11:47
1

Download this from the app store onto the iphone, you can then view logs directly on the phone:

https://itunes.apple.com/us/app/console/id317676250?mt=8

Please note, this is an old app, it will crash when launched, then on reopening it will show you the device logs.

If that fails, here is a link to the iPhone configuration utility for windows: http://download.cnet.com/iPhone-Configuration-Utility-for-Windows/3000-20432_4-10969175.html

Swinny89
  • 7,273
  • 3
  • 32
  • 52
  • installed and does not seem to work. app itself is very old and says its designed for iOS 4.0 .... – epeleg Aug 09 '15 at 13:52
  • On first launch it crashes, then relaunch it and it will show you the device log – Swinny89 Aug 09 '15 at 13:55
  • nope, it does not seem to crash but it does not show anything either, just a filter at the top and a refresh button beside it and what seems like an empty list below it... (I also tried to kill it and re-run it with exactly the same results). – epeleg Aug 10 '15 at 05:47
  • its an iphone 4 with iOS 7.1.2 – epeleg Aug 10 '15 at 05:50
  • Have amended answer with a link to iPhone configuration utility for windows – Swinny89 Aug 10 '15 at 07:25
  • So I uninstalled my existing version of ICU (was v 3.6.2.300) and installed the one from your linke (3.6.1.296). When trying to execute it it says "iPhone Configuration Utility failed to locate 'Apple Mobile Device Support'. please reinstall iPhone Configuration Utility. You can download iPhone Configuration Utility from http://www.apple.com/support/iphone/enterprise/ ". However, the page pointed to by the link does not have any version of this app. – epeleg Aug 10 '15 at 11:34
  • Also - a service by the name ' Apple Mobile Device Support' is installed and running - trying to restart it did not help at all. – epeleg Aug 10 '15 at 11:36