Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 6 debug console gone?

Tags:

ios

iphone

ios6

I used to use the "Debug Console" for mobile Safari to print out console.log messages when I'm troubleshooting. With iOS 6, in Safari's advanced settings, the "Web Inspector" replaced the "Debug Console." Unfortunately, my company doesn't allow me to plug the phones we're testing with into the computers we're developing on.

Does anyone know how to enable messages printed by using console.log() to be show on iPhones with iOS 6?

like image 736
Matt Avatar asked Sep 25 '12 16:09

Matt


People also ask

How do I debug my iPhone 6?

Here's how: Open the iPhone Settings menu. On an iPhone with an early version of iOS, access the Debug Console through Settings > Safari > Developer > Debug Console. When Safari on the iPhone detects CSS, HTML, and JavaScript errors, details of each display in the debugger.

How do I view console log in Safari iOS?

Apple Safari To do that, go into Safari's preferences (Safari Menu > Preferences) and select the Advanced Tab. Once that menu is enabled, you will find the developer console by clicking on Develop > Show Javascript Console. You can also use the shortcut Option + ⌘ + C .


1 Answers

I have found it helpful to output any JS errors with an alert on window.onerror ->

window.onerror = function(error) {     alert(error); }; 

I paste that into the top of scripts so that any runtime errors will be output in a native alert. Works on desktop too.

like image 136
rgdigi Avatar answered Oct 06 '22 01:10

rgdigi