Bug 20683 - Script Debugger is partly paused, partly not when stopping at a breakpoint in eval()'d code.
Summary: Script Debugger is partly paused, partly not when stopping at a breakpoint in...
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-06 00:40 PDT by Emanuele Vulcano
Modified: 2014-12-11 09:30 PST (History)
1 user (show)

See Also:


Attachments
The test case as a discrete file. (284 bytes, text/html)
2008-09-06 00:41 PDT, Emanuele Vulcano
no flags Details
A screenshot of the Script Debugger exhibiting the bug. (70.86 KB, image/png)
2008-09-06 00:41 PDT, Emanuele Vulcano
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emanuele Vulcano 2008-09-06 00:40:15 PDT
When the Script Debugger has a breakpoint set in eval()'d code, stopping at that breakpoint leaves the debugger window in an undesirable "mixed" state. Parts of it think it's paused (notably the step controls at the top right of the window, which report 'Paused'), while other parts think it's not (notably the Scope Variables and Call Stack views, which report "Not Paused", and the current line indication highlight, which isn't shown).

Step-in, step-out, step-over and continue controls work, but not having the current line highlight makes them hard to use.

A minimal test case:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
	<head>
		<title></title>
	</head>
	<body>
		<script>
			eval("window.someFunction = function() {\nalert('Hello, world!');\n};");
		</script>
		
		<button onclick="window.someFunction();">Test script</button>
	</body>
</html>

To trigger the bug, do the following:
1. Open the page and enable the Script Debugger.
2. From the debugger file list, choose "(program)" to see the eval'd code listing.
3. Place a breakpoint in line 2 of the listing.
4. Click the button in the page.

(This bug makes debugging cappuccino.org scripts rather difficult, unfortunately.)
Comment 1 Emanuele Vulcano 2008-09-06 00:41:07 PDT
Created attachment 23211 [details]
The test case as a discrete file.
Comment 2 Emanuele Vulcano 2008-09-06 00:41:51 PDT
Created attachment 23212 [details]
A screenshot of the Script Debugger exhibiting the bug.