Chrome’s Conditional Breakpoints

One thing I just recently found out is that you can set conditional breakpoints in Chrome. Open up the inspector and go to the sources tab. Find the script you are wanting to debug, then set a breakpoint like you would normally. Now right click the breakpoint and select “Edit Breakpoint”. You will get a nice text box where you can write some javascript code that will be evaluated when the breakpoint is hit to see weather or not the breakpoint should be ignored.

Screen Shot 2013-02-26 at 7.12.16 PM

This is extremely useful when debugging functions that are executed many times but you only want to break when it is being called with specific arguments. Hope this helps someone out!

Category(s): computing

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>