I have a javascript image gallery that works in all desktop browsers with no errors. For some reason it fails in the standard browser that ships with Samsung phones which is called Chromium - not Chrome.
I have downloaded the Chromium emulator and my script works fine in the emulator but still fails in the real browser.
Seeing as the real browser is on my phone and it has no debug console how can I trace execute the script to see where it fails?
Often when playing CodeCombat multiplayer, or simulating matches, especially with multiple tabs going at a time, I'll see my tabs stop responding. CPU usage goes to about 1%, but all animations on the page stop, JavaScript stops responding, and the dev tools interface sort of responds but can't actually do anything. I have to end the tab's process from the Chrome task manager.
This happens in Chrome Beta (34) through Canary (35), but not in stable (33).
I'm pretty sure it's not some sort of weird localStorage deadlock, and we're not using any synchronous networking, and it happens in incognito mode without any extensions, so what could it be?
Update: It has since stopped happening, so presumably Chrome fixed some bug.
Google chrome provides remote debugging, which is how I normally debug on my Galaxy S3, but I have now come across a problem with loading speed and javascript lag that appears only to happen in the default browser and not in Chrome.
Can anyone suggest any tools/methods for testing with the default browser.
I'm not even sure where to begin. Page loads fine on my 5, but not my 4S. Instead it crashes the browser to the home screen.
Without sharing the specific URL, can you point me in the right direction to debug this?
There are no discernible errors in Firebug or other debugging tools on my computer.
You should be seeing a crash report in Xcode organizer and an exception on the command line. Since this is an Apple app you should report this as a Radar.
Does your 5 have a newer version of safari?
Use the iOS simulator if you have it, and then try running with different versions of safari, you can get a log output from it, especially if you are using dashcode, otherwise I think it is in the system logger. That is, if you have a Mac.
I'm doing some rough development on the iPhone. I'm writing a native iPhone app, which uses an UIWebView object to load web sites with javascript. I find very difficult to debug the javascript code on an iPhone.
What are the methods/techniques available for this matter?
Since Safari on the iPhone is using webkit, you could use the debugger built into desktop Safari's web inspector. While there will probably be some quirks that are different between platforms, it will give you a pretty good idea of what's going on in the interpreter.
If you have access to an Android phone, you can debug your application using desktop Chrome's full developer tools and a USB cable (very convenient).
That means the debugger, profiler, HTML inspector, etc, all running on your mobile phone, but accessed through chrome running on your laptop/desktop computer.
Android Chrome and iPhone Mobile Safari are usually more similar to each other than Desktop Safari is to Mobile Safari, the screen format will be similar, the layout similar, and you'll be able to try real touch events, etc.
https://developers.google.com/chrome/mobile/docs/debugging
It'll require Chrome, an Android device able to run the android Chrome app, and a USB cable.
You have to install and use the ADB console command, but once its working, you'll have the full chrome developer tools interface available for debugging mobile.
Similar to Adrian Harris, it is possible to debug any website on the iphone by creating a dummy project in dashcode, clicking on "Mobile Safari" and then "Run"
Once the iPhone Simulator opens and safari opens with the dummy project website, click on the url bar of safari, enter any public url, and when you are at the site, you can click "Pause" and the debugger will pop up after any javascript code runs. At this point, variables can be inspected, breakpoints set, etc.
I know this is an old question, but wanted to update the answers with the latest info ->
The new safari (for mac) has a way to use the web inspector on an actual iphone or ipad in real time if you have the latest software (safari, iOS6, and MacOS) and an attached (with a cable) iDevice.
You access it by enabling it in the "advanced" safari preferences on the iphone, then under the develop menu in safari on the mac. See here for more info: http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/DebuggingSafarioniPhoneContent/DebuggingSafarioniPhoneContent.html#//apple_ref/doc/uid/TP40006515
You can also access the simulators in the same way (installed with xCode).
I agree with pjbeardsley. I would add to use your web page within http://www.testiphone.com/ just so you can see what the dimensions will be like. I would definitely use Safari and the Web Inspector for it as well
I have had mixed success using Dashcode which has a javascript debugger paired with the iPhone Simulator. It is a bit tricky to get working because you can't launch it without opening a project. But as I recall, I posted the project on the web, launched a placeholder project, and then debugged the placeholder project in Dashcode. Then I navigated to my url in the Simulator and was able to set breakpoints. There were probably a few other hoops to jump through, but once it was working, it was like I had a real debugger within Mobile Safari, which was great.
Good luck