Bug 118542 - Web Inspector: Debugger hangs after breakpoint in iOS code launched by [UIWebView stringByEvaluatingJavaScriptFromString]
Summary: Web Inspector: Debugger hangs after breakpoint in iOS code launched by [UIWeb...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac Other
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-07-10 16:08 PDT by Greg Lutz
Modified: 2016-12-13 15:38 PST (History)
2 users (show)

See Also:


Attachments
A tar archive of a small Xcode iOS project (85.00 KB, application/octet-stream)
2013-07-10 16:08 PDT, Greg Lutz
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Lutz 2013-07-10 16:08:37 PDT
Created attachment 206416 [details]
A tar archive of a small Xcode iOS project

[The components involved are
  WebKit nightly build 152535
  Xcode Version 4.6.3 (4H1503)
  iOS Simulator Version 6.0 (369.2)
  OS X 10.8.4]

The attached project creates a UIWebView and populates it with a toy HTML document. It then inserts into that document's head a <script> tag whose "src" attribute references a small JavaScript file JS.js. Build and execute it under Xcode with the iPhone Simulator as device. It advises you to attach the Web page to Web Inspector. The HTML document and the JavaScript script duly become visible in Web Inspector. To continue execution, enter "init()" in the Web Inspector console command line. The app continues by using [UIWebView stringByEvaluatingJavaScriptFromString] to invoke fcn(), a function created by function init(). This causes a JavaScript alert ("Inside fcn()") to appear. If you dismiss this alert, execution continues normally with an alert message from the App ("fcn() call returned...").

However, if you set a breakpoint on line 8 of the script ('return "fcn result";'), either before entering init() or before dismissing the "Inside fcn()" alert, execution stops at this breakpoint in Web Inspector, but then nothing more can be done: Web Inspector doesn't respond to any of the buttons for continuing execution.
Comment 1 Radar WebKit Bug Importer 2013-07-10 16:08:58 PDT
<rdar://problem/14408486>