admin管理员组文章数量:1287811
I'm trying to debug a 3rd party widget (+1 button to be exact). Specifically, I'd like to set a breakpoint in Chrome that stops when a button in the widget is clicked.
I would like to break on the 3rd party code that handles to click
event. Is there a Chrome extension (or something else I haven't thought of) to help me find the right place in the code to break on?
I'm trying to debug a 3rd party widget (+1 button to be exact). Specifically, I'd like to set a breakpoint in Chrome that stops when a button in the widget is clicked.
I would like to break on the 3rd party code that handles to click
event. Is there a Chrome extension (or something else I haven't thought of) to help me find the right place in the code to break on?
1 Answer
Reset to default 13You can make use of Chrome's Developer Tools; no extension is required.
I made a +1 button example here: http://jsfiddle/rPnAe/.
If you go to that fiddle and then open Developer Tools (F12), then go to Scripts and expand Event Listener Breakpoints and lastly expand 'Mouse' and tick the 'click' checkbox, then whenever you click somewhere (which includes an event listener), the debugger will now break at the line of code which contains the listener function.
本文标签: javascriptHow to set a breakpoint on clicking a 3rd party buttonStack Overflow
版权声明:本文标题:javascript - How to set a breakpoint on clicking a 3rd party button? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741276956a2369783.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论