丶 Limeー来夢 丶
丶 Limeー来夢 丶

Reputation: 957

Break on file download on Chrome devtools?

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?

Upvotes: 1

Views: 834

Answers (1)

Pankaj Parashar
Pankaj Parashar

Reputation: 10232

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

Upvotes: 1

Related Questions