Bug 20409 - Command line API unavailable when paused in the debugger
Summary: Command line API unavailable when paused in the debugger
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Timothy Hatcher
URL:
Keywords:
: 21617 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-15 17:29 PDT by Timothy Hatcher
Modified: 2010-09-06 09:21 PDT (History)
4 users (show)

See Also:


Attachments
proposed patch (2.80 KB, patch)
2008-09-07 05:21 PDT, Keishi Hattori
timothy: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2008-08-15 17:29:05 PDT
The command line API in unavailable in the COnsole when paused in the debugger.

Things like dir({x: 1}) and clear() fail.
Comment 1 Keishi Hattori 2008-09-07 05:21:18 PDT
Created attachment 23226 [details]
proposed patch
Comment 2 Timothy Hatcher 2008-09-07 08:31:13 PDT
Comment on attachment 23226 [details]
proposed patch

This patch is the right approach, but it will break printing of local variables. ANy local variables that shadow a window property, like document or alert, etc. will always print the window version and not the local version.

We can't use the with statement when paused. So I am not sure how to fix this in JS alone. We might need to modify evaluateInSelectedCallFrame to take an object that it adds to the bottom of the scope chain, so local variables are found first.
Comment 3 Timothy Hatcher 2009-06-29 09:25:50 PDT
*** Bug 21617 has been marked as a duplicate of this bug. ***
Comment 4 Alexander Pavlov (apavlov) 2010-09-06 09:21:37 PDT
dir({x: 1}) and clear() work for me on ToT (r66819)