I've been working with webapps a bit lately, and I think it could be very useful, if in the DOM inspector, specifically the Event Listeners section, you could set a break point on the function that gets triggered by the event, straight from the DOM inspector. This would especially be handy when you have to deal with anonymous functions attached to events.
Web Inspector already has DOM breakpoints, XHR Breakpoints and Event Listener breakpoints. All these things are available at ToT of Chromium and WebKit.
Derk has some good points. "specifically the Event Listeners section, you could set a break point on the function that gets triggered by the event, straight from the DOM inspector" I think Chromium linkify's the function in the Event Listener's sidebar and ToT WebKit doesn't yet. But linkification would handle this use case pretty easily as you could jump to the function's def'n and set the breakpoint on that line. But it might make sense to repurpose this and have it request the functionality to set a breakpoint for an Event type automatically from the Event Listener's sidebar. Ilya, is that possible right now? I regret that I've fallen a bit behind there. Derk, were all your concerns handled by the new breakpoint functionality?
(In reply to comment #2) > Derk has some good points. > > "specifically the Event Listeners section, you could set a break point > on the function that gets triggered by the event, straight from the > DOM inspector" > > I think Chromium linkify's the function in the Event Listener's sidebar > and ToT WebKit doesn't yet. But linkification would handle this use > case pretty easily as you could jump to the function's def'n and set > the breakpoint on that line. > > But it might make sense to repurpose this and have it request the > functionality to set a breakpoint for an Event type automatically from > the Event Listener's sidebar. Ilya, is that possible right now? I regret > that I've fallen a bit behind there. > > Derk, were all your concerns handled by the new breakpoint > functionality? You are right. It is not possible to setup a breakpoint from Event Listener's sidebar of Elements panel.
I never followed up on this I see. My concern was partly solved by the linkification. However, what I really would like is to just put a breakpoint on that specific function right from the sidepanel. The reason is minified code. Putting breakpoints on minified code is a PITA right now. If you could set a breakpoint on a specific function straight from the Event Listener's sidebar, then debugging minified code would be significantly simpler. I guess this first requires adding some functionality to the debugger to not fully rely on line information for breakpoints, but also on blocks/expressions/conditions.
(Migrating component) I believe that linkified positions now always use line + column so it should work for minified code just fine. However there is still the indirection of clicking link and then navigating it. I renamed the bug to better reflect what the fix would be. This could be added for any linkified location- I think it would be great in the timeline records UI.
<rdar://problem/19096426>
Created attachment 303028 [details] Patch
Comment on attachment 303028 [details] Patch r=me
Comment on attachment 303028 [details] Patch Rejecting attachment 303028 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'apply-attachment', '--no-update', '--non-interactive', 303028, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: ile Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js patching file Source/WebInspectorUI/UserInterface/Views/DetailsSection.css Hunk #1 FAILED at 31. 1 out of 1 hunk FAILED -- saving rejects to file Source/WebInspectorUI/UserInterface/Views/DetailsSection.css.rej patching file Source/WebInspectorUI/UserInterface/Views/Main.css Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Brian Burg']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output: http://webkit-queues.webkit.org/results/3273030
Created attachment 303877 [details] Patch
Comment on attachment 303877 [details] Patch Clearing flags on attachment: 303877 Committed r213617: <http://trac.webkit.org/changeset/213617>
All reviewed patches have been landed. Closing bug.