Bug 20139
| Summary: | debugger keyword does not work in eval code | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Johan Lund <jl> |
| Component: | Web Inspector (Deprecated) | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | Enhancement | CC: | ddkilzer, jl, oliver, pmuellr, timothy |
| Priority: | P2 | Keywords: | InRadar |
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
Johan Lund
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?
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Mark Rowe (bdash)
<rdar://problem/6097996>
Timothy Hatcher
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.
Oliver Hunt
Curious, i cannot immediately see why the debugger keyword would not work inside the eval :-/
Johan Lund
Oliver: Do you mean that you need a test case or that you can't immediately see the root of the problem?
Oliver Hunt
I meant i can't immediately see the source of the problem -- i'm assuming eval("debugger;") will be sufficient to test?
Oliver Hunt
I can't reproduce this -- can anyone else?
Johan Lund
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.
Johan Lund
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
Oliver Hunt
@Johan: sure, but i can't guarantee i'll get to this in the immediate future
Johan Lund
No worries. I have emailed a download link and instructions.
Thanks...
Patrick Mueller
(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?
Timothy Hatcher
Please reopen if this still happens with a test case.