Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

breakpoint on submit - Chrome developer tool [duplicate]

Is there any way I can put a break point on chrome developer tool so that the screen is paused when I click submit button? In precise how to break on submit action?

like image 687
user3127042 Avatar asked Jan 18 '14 07:01

user3127042


People also ask

How do I remove a breakpoint in Chrome?

Right click the breakpoints pane (you need to have some breakpoints to see the option), and you ll find, "Remove All Breakpoints".

How do I fix dev tools in Chrome?

# Open the Issues tab Open DevTools. Click the Go to Issues button in the yellow warning bar. Alternatively, select Issues from the More tools menu. Once you're on the Issues tab, click the Reload page button if necessary.

What is XHR breakpoint?

An XHR (XMLHttpRequest) breakpoint breaks code execution when an XHR request is dispatched so that you can examine the current state of the program. You can break on all requests or on those that include a specific URL.


1 Answers

I posted a very similar answer that details how to enable specific event listener breakpoints in Google Chrome Dev Tools.

In the dev tools, go to the Sources tab, and look in the right-hand column with the expandable/collapsible sub-panes. Expand the one called Event Listener Breakpoints. Under here are expandable checkbox selections that allow you to tick any events that you wish to listen for. Once you check any of them, Chrome will break in JS code as soon as an event of that type occurs.

You specifically want the submit event under the Control group. Expand Control, and tick submit, as shown in the image below (the box on Control is added automatically to indicate that some, but not all, of the items under it are ticked). Chrome's dev tools should then hit a dynamic breakpoint immediately any time a submit event occurs.

Chrome Dev Tools Submit Event Breakpoint

Fun fact: I still had submit ticked when I clicked the button to post this answer, and Chrome hit a breakpoint :).

like image 197
ajp15243 Avatar answered Sep 17 '22 17:09

ajp15243