Adding "debugger;" to javascript acts as a breakpoint in most other JS debuggers -- it doesn't seem to work in Drosera. Any reason this isn't implemented?
Created attachment 14095 [details] A simple test case. How to use this test case: Open Drosera, attach to the Safari/WebKit process then open the attached HTML file. Click on the contained link. After the first alert is displayed, Drosera should break at the debugger keyword.
*** Bug 17232 has been marked as a duplicate of this bug. ***
<rdar://problem/5732833>
This is important since most times the debugger does not know about files that are yet to be loaded.
Still applies to the new Web Inspector debugger, moving to that component.
Created attachment 21475 [details] Patch-fu!
Comment on attachment 21475 [details] Patch-fu! I would recommend "Breakpoint" instead of "BreakPoint" to match the inspector and Xcode. +// about to leave a stack frame (i.e. return from a function) +- (void)webView:(WebView *)webView didReachBreakPoint:(WebScriptCallFrame *)frame Also that comment is not correct for the method you added.
Please don't add the WebKit debug delegate callback. The WebKit debug delegate's only client is DashCode, and it doesn't listen for the message you've added. Generally, the WebKit debug delegate is deprecated. I'd rather leave its bits completely frozen.
Committing to http://svn.webkit.org/repository/webkit/trunk ... M JavaScriptCore/ChangeLog M JavaScriptCore/VM/CodeBlock.cpp M JavaScriptCore/VM/Machine.cpp M JavaScriptCore/VM/Machine.h M JavaScriptCore/kjs/debugger.h M JavaScriptCore/kjs/grammar.y M JavaScriptCore/kjs/nodes.cpp M JavaScriptCore/kjs/nodes.h M JavaScriptCore/kjs/nodes2string.cpp M WebCore/ChangeLog M WebCore/page/JavaScriptDebugServer.cpp M WebCore/page/JavaScriptDebugServer.h M WebKit/mac/ChangeLog M WebKit/mac/WebView/WebScriptDebugger.h M WebKit/mac/WebView/WebScriptDebugger.mm Committed r34351
Awesome! Can't wait to try this out. Thanks Oliver!
Verified - works great. Thanks again.
It works but not for code that has been read in with eval. :( I will log a separate request to support evaled code.
The new related bug report is: https://bugs.webkit.org/show_bug.cgi?id=20139