Skip to content

Automated JavaScript Debugging Tool using CDP - Automatically sets breakpoints for specified strings/patterns in JavaScript code

Notifications You must be signed in to change notification settings

m4ll0k/autobreakpointer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoBreakpointer

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!

Installation

git clone https://github.com/m4ll0k/autobreakpointer.git
cd autobreakpointer
npm install

Usage

CLI Usage

# 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"

demo

poc

Programmatic Usage

const AutoBreakpointer = require('./src/autobreakpointer');

const debugger = new AutoBreakpointer({
    target: 'localStorage.getItem',
    autoResume: true,
    caseSensitive: true,
    jsFilesOnly: true,
    urlPattern: '.js'
});

debugger.start();

Configuration Options

  • 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')

Requirements

  • Node.js >= 12
  • Chrome/Chromium browser
  • chrome-remote-interface

License

MIT

About

Automated JavaScript Debugging Tool using CDP - Automatically sets breakpoints for specified strings/patterns in JavaScript code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published