Skip to content

jtuulos/break-on-access

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

Usage

breakOn bookmarklet

Omg the cookie is being changed, but where? Give me a breakpoint when JS changes my cookies!

breakOn(document, 'cookie');

Some JS is getting the scrollTop value causing massive Recalculate Styles costs.. Who is the perpetrator PERFetrator?

breakOn(document.body,'scrollTop', 'read')

This works really well as a snippet in the Chrome DevTools:

![](http:https://i.imgur.com/snA9unr.png)

By default, breakOn will only break when JS attempts to change the value of a property. The third optional argument takes 'read' if you'd also like to break when values are read.

It is also possible to disable/enable a breakpoint by using methods provided by returned object.

var bp = breakOn(document, 'cookie');
// found it!
bp.disable();
// something else is up....
bp.enable();

Authors

Dave Methvin, Paul Irish, fat, and these handsome people

History

Object.defineProperty(twttr, 'profile', {
    get: function () {
      debugger
    }
  , set: function (val) {
      debugger
    }
})

About

break on access to a property

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%