safari 11 crashing when debugging on web inspector - javascript

Safari 11 is crashing when i open web inspector. Odd thing is, It works without failing if i don't open console panel. My HTML5 application works well in all other browsers.
There is no memory leaks as it is not going beyond 50MB while taking memory heaps. And no use of console methods.
Is this a known issue in Safari 11?

The only thing I can do to fix this is free up RAM. If I close a few applications and then try it again, it always works. Also after it crashes a few times you will not be able to inspect your device until you quit safari completely and open it again.

Some say it seems to be an hardware issue, happening only when the battery is at 100%.
Have a closer look here:
https://forums.developer.apple.com/thread/92290
Maybe it helps keeping on your flashlight and camera, then establishing a cable connection and starting the web inspector then.
Anyway: This wasn't working for me.
Another Maybe: Connect via network instead of a cable connection.
Things that might be too late by now:
Advice 1: Do not upgrade above 10.x and use Safari 10.x along with iOS 10.x
Advice 2: Put your devices in trash or sell it anyway and start not to use apple anymore. 99% of my upsets lead to issues with iOS and Mac.

Related

Cross-browser issue: How do I debug my site's behavior on safari with window PC?

Live page: tt.fbcwinterretreat.org
The page and its script work well with chrome, IE and firefox. But on iPhone/iPads, not only the layout messed up, but also the image carousel doesn't work. I don't have a mac so I havn't tested it on Mac, but I'm quite sure it won't work on Mac either. To find the problem, I need something like chrome's dev tools to debug it, the question is, how do I do it with a window PC?
I have tried safari for windows, it turns out Safari has stopped support for window since 2012. And the latest version(5.1.7) is totally unreliable. So how do you guys make sure your sites/codes work on Safari if you have only window PC? I believe this must be a very general question.
The best solution is to buy a (second-hand) Mac. Apple does not allow installation of OS X on any machine than a Mac so running a virtual machine is not an option. Alternatively you could use one of the online browser compatibility tools such as
http://crossbrowsertesting.com/ although they are relatively pricey, but in return they provide a comprehensive list of browsers and browser versions.

browser api gamepad not detecting in windows

I'm having a strange problem. I have an ancient microsoft sidewinder version 1 gamepad laying around, And since I'm learning javascript/html5 I thought let's try the gamepad in browser.
I tried it on linux (my laptop, ubuntu 13.04) did:
navigator.webkitGetGamepads()[0] in the console of my chrome browser (version 28.0.1500.71) and the gamepad was detected right away.
Than I tried the same thing on my windows 7 64 bit desktop, running Version 30.0.1599.101 m
did: navigator.webkitGetGamepads()[0] in the console, but no luck here, it keeps telling me undefined. When I go to "my devices" in windows, the gamepad is there.
(https://www.dropbox.com/s/yam4fj5zqiogyjh/gamepad.png)
I have the same problem on my laptop running windows 8, 64 bit.
I have no idea what's wrong, and I have no idea how to fix it. (I hope it's fixable)
Please help
You might want to try the most known gamepad testing scripts first.
Chrome: http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad-tester/tester.html
Firefox (28, use Aurora) : http://luser.github.io/gamepadtest/
If your Gamepad is using DirectInput and not XInput you may have some issues with Chrome, but it will work fine with Firefox then. For instance, I had the same problem with the PS4 Gamepad.
The spec is unfinished, but this repository is a great start. Try it:
https://github.com/luser/gamepadtest
It attempts to account for differences in implementations of the unfinished spec, as well as Chrome's prefixed implementation.

why is this page crashing iOS?

http://bit.ly/Z7YPj7
It works fine on the desktop everywhere, and also on Android. But on the iPhone Simulator, the culprit appears to be in the file: js/the-anim36.js (which queues a whole bunch of Raphael SVG animations).
I'm monkeying around with Safari 6's "Develop" menu, which can now log info from the XCodes's iOS Simulator, which i downloaded and fired up. But I'm getting absolutely nothing in the javascript console, and a hard crash in the simulator each and every time I open the html file. I have to "Reset Content and Settings" each time I try to open the file. I'm frankly lost here, admittedly a novice at debugging in general (and also probably spoiled by Chrome.) Any pointers on what's possibly going on here would be very appreciated.
You can run out of memory really fast on iOS. Run it through the Chrome profiler and see what you're memory usage looks like. I bet it's using > 10mb of ram. In which case you're probably toast!
Check out this informative article, that claims after about 6mb of ram, you will crash mobile safari:
http://cubiq.org/testing-memory-usage-on-mobile-safari
I observe that when I open that page my laptop fan run on high. The thing is consuming a lot of CPU (and likely a lot of RAM) and may simply be exceeding the allowable resource limits on iOS. If not running out of RAM it could be causing the foreground process to run too long, triggering the logic that cancels "looping" apps.

How to debug web app on windows mobile (7 and later) [duplicate]

I'm not a Windows Phone developer, and I want as little to do as possible with anything related to Microsoft. Nonetheless, I need to get my mobile web app running properly on Windows Phone 7. What debugging tools are available for the platform? Something like the Webkit developer tools or Firebug would be ideal, either from the phone itself or more likely, remotely debugging from my computer.
If such a thing doesn't exist, I'd settle for being able to read Javascript error messages, and view the contents of variables using alert() or similar. At this point, all I know is that my JS is failing: I don't know where or why, let alone how to fix it.
My dev computer is running OS X, and I'd really like to be able to use these tools from OS X if possible. Assuming that debugging tools exist (which I really hope they do) are they designed for Windows only? If so, does anyone know how well they would work with Wine or similar?
EDIT: I have a physical Windows Phone 7 device, so I can use that. However, alert() doesn't seem to be working, which is why I'm posting this question. Does alert() normally work on the WP7 browser?
You'll likely find the Mobile Perf Bookmarklet to be the easiest all-in-one tool for testing any mobile device.
Works well on the iPhone/iPad/Samsung Galaxy Tab in my testing so far.
Quote:
It displays a menu with links that load other bookmarklets including Firebug Lite, Page Resources, DOM Monster, SpriteMe, CSSess, and Zoompf.
Unless you have a Windows Phone 7 device, you will need to run Windows in BootCamp and install the Windows Phone Developer Tools in order to test in IE on the emulator. I don't know about Whine, but I ran into major problems trying to test in Parallels - so based on my experience, I suggest keeping it as simple as possible.
There is no console in IE on the phone, so you will need to use alert, like you suggested, or just write text to a div on your page as a custom console.
If you really want to code in OS X (which I definitely understand), using a separate machine for testing IE in the WP7 emulator is going to be your best bet.
EDIT: I just tested alert and it did work fine on my Windows Phone. My guess is that a syntax error is preventing it from calling.
The following may be interesting
Simple IE debug tool for Windows Phone
Supports
Html traversing
Html node styles, properties, metrics
Reading console output
Executing js on device side from console (including intellisense)
Dynamic script injection - ability to debug live sites
Not supported
js breakpoints
Just wanted to add a note to say that full JavaScript debugging is possible now with Windows Phone 8.1 and Visual Studio 2013 Update 2. Full details are available at:
http://blogs.msdn.com/b/visualstudioalm/archive/2014/04/04/diagnosing-mobile-website-issues-on-windows-phone-8-1-with-visual-studio.aspx
I realize that this doesn't help the versions referenced in the original question (WP7), but I'm hoping this will help people who may find this question and are running a more recent version.
Something that has worked for me, is to test my mobile pages through the Windows Vista built-in Internet Explorer browser.
It comes with a script debugger ( which you have to enable in Advanced Options tab through the Internet Options menu ), and it seems that it gets really close to the Internet Explorer Mobile implementation.
Another tip would be, that, instead of using window.alerts, you can also use document.write or set output to a div content.
I'm using this hack to have console.log send info back to the server (it uses window.fetch, which I'm polyfilling, but could use xhr instead) https://gist.github.com/wheresrhys/bf93057ee3a594454582

Chrome Dev Tools very slow to respond in large web app

I have a large, javascript heavy web app that I am working on. I am experiencing very slow response times from Chrome Dev Tools for XHR responses and console loggging (3-5 secs). The actual app is running fast and responsive, only dev tools looks like it is suffering.
Does anyone have any idea why Chrome Dev Tools is becoming sluggish as my app grows?
Devtools are like any other debugger; they hook into the normal processing flow of an application, and store quite a bit more information than is normally required. This is much more work than simply rendering the page without debugging enabled, so it will indeed be slower.
That said, 3 seconds to respond to console.log seems high. I'd suggest that you first test the application in a nightly version of WebKit. If it's responsive in WebKit, but not in Chrome, please file a bug against the inspector via http://new.crbug.com/ along with any information you can provide about what scenario causes the slowness.
If it's equally sluggish in WebKit, please file a bug against WebKit's Inspector component: https://bugs.webkit.org/enter_bug.cgi
Either way, post the bug ID here, and I'll see that it's triaged into the correct team.
I "fixed" the slow chrome developer tool by (under SOURCES tab)
clearing the "watch" list that accumulated over time...
clearing all the "snippets", i had dozens as well...
Not sure which of both made the most difference, but it certainly made a difference
This is an old question, but it may help someone landing here later like I did.
Using Chrome 46.x/47.x on Linux (RHEL 7), none of the proposed solutions worked for me. What did work was to disable the setting "Use hardware acceleration when available", in the advanced browser settings.
I noticed in the process monitor/list that the Chrome renderer was taking up a lot of CPU, even putting a breakpoint or stepping throught statements in the debugger would take 10+ seconds!
Might be worth a shot.
Undock the developer tools into separate window.
In my case, it's work.
I struggled with this also, to the point where stepping through code using the chrome debugger was just so slow it took hours away from my productive development time. In watching the CPU utilization when debugging in chrome I would see it use up to as much at 40% of all 4 cores of my processor. I tried everything to no avail. Finally, I tried making the browser window of the page I was debugging as small as I could without losing any of the required view and miraculously it solved the problem. So, now I keep my debugger window popped out in a separate window, and make the window of the page I am debugging as small as I can and my debugging experience is very fast again. I have tested this over a period of weeks and it has held out. Hope this helps someone.

Categories

Resources