Safari debugger hangs when debugging javascript in WKWebView

Originator:jeremy
Number:rdar://27001688 Date Originated:June 24, 2016
Status:Open Resolved:
Product:Safari Product Version:
Classification: Reproducible:
 
Summary:
About 50% of the time when debugging JS in a WKWebView embedded in a native iOS application, the debugging session completely hangs. I am able to close the window and navigate between views (Debugging, Console, Timelines, etc) but I cannot inspect any variables, execute statements in the console, or resume the execution (Play/Pause execution, step into/over). Once this occurs I need to close the Safari window and re-attach. At times I need to completely restart the debugging session be re-launching my iOS app and then re-attaching with Safari.

Steps to Reproduce:
1. Run an iOS app containing a WKWebView 
2. Attach Safari to the WKWebView
3. Set a breakpoint on some javascript
4. Exercise javascript to hit the breakpoint
5. Wait a short while (10-20 seconds)
6. Attempt to step over the breakpoint line of code

Expected Results:
I can step over/into and resume javascript execution as needed.

Actual Results:
Sometimes the entire debugging session just becomes unresponsive. I can't step forward or resume javascript execution. 

Version:
iOS 8 and 9 (both on device and in the Simulator)
Safari 9.1.1 and Safari Technology Preview 9.1.2
OS X El Capitan 10.11.5

Notes:


Configuration:
I have not found a configuration where this _does not_ occurred.

Attachments:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!