AutoBreakpointer (beta v1.1.0) is a Chrome DevTools Protocol based tool that automatically sets breakpoints for specified strings or patterns in JavaScript code. It's particularly useful for debugging and monitoring specific JavaScript functions or properties across multiple files when you test your targets!
git clone https://github.com/m4ll0k/autobreakpointer.git
cd autobreakpointer
npm install
# Run your chrome
google-chrome --remote-debugging-port=9222
# Track specific string
node src/autobreakpointer.js "document.cookie"
# Default tracking location.search
node src/autobreakpointer.js
# Track multiple strings
node src/autobreakpointer.js "location.search|.innerHTML|document.write"
const AutoBreakpointer = require('./src/autobreakpointer');
const debugger = new AutoBreakpointer({
target: 'localStorage.getItem',
autoResume: true,
caseSensitive: true,
jsFilesOnly: true,
urlPattern: '.js'
});
debugger.start();
target
: String to track (default: 'location.search')autoResume
: Automatically resume after hitting breakpoint (default: false)caseSensitive
: Case sensitive search (default: true)jsFilesOnly
: Only track .js files (default: true)urlPattern
: File pattern to match (default: '.js')
- Node.js >= 12
- Chrome/Chromium browser
- chrome-remote-interface
MIT