Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nv/setinterval-sniffer
Keep tabs on your uncleared intervals. Hunt down lags and memory leaks.
https://github.com/nv/setinterval-sniffer
chrome-devtools chrome-devtools-extension chrome-extension debugging-tool javascript
Last synced: about 1 month ago
JSON representation
Keep tabs on your uncleared intervals. Hunt down lags and memory leaks.
- Host: GitHub
- URL: https://github.com/nv/setinterval-sniffer
- Owner: NV
- License: mit
- Created: 2013-05-22T20:57:02.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-04-18T01:14:48.000Z (over 1 year ago)
- Last Synced: 2024-08-04T09:05:39.150Z (4 months ago)
- Topics: chrome-devtools, chrome-devtools-extension, chrome-extension, debugging-tool, javascript
- Language: JavaScript
- Homepage: https://chrome.google.com/webstore/detail/setinterval-sniffer/odkgihncjgklajjabihpoipfnpcjhdno
- Size: 80.1 KB
- Stars: 42
- Watchers: 5
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.mdown
- License: MIT-LICENSE.txt
Awesome Lists containing this project
- awesome-network-stuff - **34**星
README
# setInterval sniffer
![Chrome DevTools Timers panel](http://nv.github.io/setInterval-sniffer/setInterval-sniffer.png)
## This no longer works
If you relly want to see this extension, consider sponsoring my projects.
## Install
From [Chrome App Store](https://chrome.google.com/webstore/detail/setinterval-sniffer/odkgihncjgklajjabihpoipfnpcjhdno) or from the repository:
* chrome://extensions/
* Turn on "Developer mode" checkbox
* Click "Load unpacked extension..." button
* Select `setInterval-sniffer/chrome` folder## How does it work
The sniffer monkey patch (extend without altering the original source code) setInterval method:
```javascript
var originalSetInterval = window.setInterval;
window.setInterval = function(fn, time) {
var id = originalSetInterval(fn, time);
post({
functionName: 'setInterval',
fn: fn.toString(),
id: id,
time: time
});
return id;
};
```## Roadmap
* Don't stop sniffing on page reload
* Button to kill an interval in Timers panel
* Add stacktrace data using the technic from [captureCalls.js](https://github.com/NV/captureCalls.js)
* Display setTimeout too, visually separate them from setInterval
* Make it prettier