RESOLVED WORKSFORME 20139
debugger keyword does not work in eval code
https://bugs.webkit.org/show_bug.cgi?id=20139
Summary debugger keyword does not work in eval code
Johan Lund
Reported 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?
Attachments
Mark Rowe (bdash)
Comment 1 2008-07-23 15:58:33 PDT
Timothy Hatcher
Comment 2 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.
Oliver Hunt
Comment 3 2008-07-24 00:39:28 PDT
Curious, i cannot immediately see why the debugger keyword would not work inside the eval :-/
Johan Lund
Comment 4 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?
Oliver Hunt
Comment 5 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?
Oliver Hunt
Comment 6 2008-09-26 05:23:20 PDT
I can't reproduce this -- can anyone else?
Johan Lund
Comment 7 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.
Johan Lund
Comment 8 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
Oliver Hunt
Comment 9 2008-10-13 10:20:23 PDT
@Johan: sure, but i can't guarantee i'll get to this in the immediate future
Johan Lund
Comment 10 2008-10-14 01:04:11 PDT
No worries. I have emailed a download link and instructions. Thanks...
Patrick Mueller
Comment 11 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?
Timothy Hatcher
Comment 12 2009-10-29 07:58:57 PDT
Please reopen if this still happens with a test case.
Note You need to log in before you can comment on or make changes to this bug.