Break on file download on Chrome devtools?

Viewed 31

I see a lot of event listener breakpoints on the devtools, but not "download" or such.

I want to trigger a break on file download, is it possible through a setting or a program/JS?

1 Answers

download isn't an event in JavaScript, hence, you don't see it in the event listener breakpoints section. However, you can set a listener on XHR/Fetch calls, which would pause execution when the browser tried to fetch something.

More info: https://www.canidev.tools/debug-xhr-fetch-calls/chrome

enter image description here

Related