Bug 20139 - debugger keyword does not work in eval code
Summary: debugger keyword does not work in eval code
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2008-07-23 02:28 PDT by Johan Lund
Modified: 2009-10-29 07:58 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Lund 2008-07-23 02:28:58 PDT
The new break on "debugger" keyword feature only works if the JavaScript code belongs to an actual file.
The debugger does not seem to be able to work with code that has been read in with eval.
Unfortunately most of the code of our JavaScript framework (Bindows) is evaled in which renders the webkit debugger nearly useless to us.

We have the same problem with FireFox but in Internet Explorer they have solved this with the Microsoft Script editor.

Could something please be done towards this?
Comment 1 Mark Rowe (bdash) 2008-07-23 15:58:33 PDT
<rdar://problem/6097996>
Comment 2 Timothy Hatcher 2008-07-23 16:17:16 PDT
We do support debugging eval code, you can step into the eval call and debut the parsed script. This is just a bug with the debugger keyword.
Comment 3 Oliver Hunt 2008-07-24 00:39:28 PDT
Curious, i cannot immediately see why the debugger keyword would not work inside the eval :-/
Comment 4 Johan Lund 2008-07-24 01:13:07 PDT
Oliver: Do you mean that you need a test case or that you can't immediately see the root of the problem?
Comment 5 Oliver Hunt 2008-07-24 01:35:50 PDT
I meant i can't immediately see the source of the problem -- i'm assuming eval("debugger;") will be sufficient to test?
Comment 6 Oliver Hunt 2008-09-26 05:23:20 PDT
I can't reproduce this -- can anyone else?
Comment 7 Johan Lund 2008-09-26 07:49:18 PDT
In Bindows with a late webkit version the debugger keyword breakpoints the code at the correct location and I can step but I am in the wrong file (I'm in the launcher html file) and I cant see the code that is actually executing. So I did some initial work on trying to repro this outside of Bindows - unsuccessful so far. I will continue and get back to you with more research as soon as possible.
Comment 8 Johan Lund 2008-10-13 02:08:05 PDT
I have tried to reproduce this in a clean scenario but I am unable to.
Is it ok if I send you a link via email with code that reproduces this problem?

Best regards
Johan Lund
Bindows Team
Comment 9 Oliver Hunt 2008-10-13 10:20:23 PDT
@Johan: sure, but i can't guarantee i'll get to this in the immediate future
Comment 10 Johan Lund 2008-10-14 01:04:11 PDT
No worries. I have emailed a download link and instructions.
Thanks...
Comment 11 Patrick Mueller 2009-10-29 07:20:11 PDT
(In reply to comment #10)
> No worries. I have emailed a download link and instructions.

I tried a simple test of this and was able to get the debugger to stop with the debugger "command" in an eval'd string.

WORKSFORME

Where's the test case?  Or since this is >1 year old, maybe there was a problem but it's since been fixed?
Comment 12 Timothy Hatcher 2009-10-29 07:58:57 PDT
Please reopen if this still happens with a test case.