Text

How to manually set a breakpoint in Chrome / Firebug / Firefox

I just found out a feature of Chromes debugger today, that I was searching for a while, but never found out:

How to set breakpoints in code, so that when you run over a function the debugger will automatically stop at that line of code.

Whenever you use the special keyword debugger in your script, FireBug / Chrome will treat that line as if it was a breakpoint, and stop your script right there.

This is so handy! Of course you can still set breakpoints by clicking on the line number in debugger.

So have fun debugging your code!


Text

Inspecting cookies using Web Inspector’s / Firebug’s console

Ever wanted to know, which cookies are set for your domain?

Modern Browsers often have the possibility to see the cookies saved on your system.

Google Chrome even has a very detailed list under “Preferences / Show Cookies and other data for websites”, which also gives you the possibility to see if a site uses HTML5 LocalStorage.

However there is a simpler trick: Just open up Web Inspector in Google Chrome /Safari or  Firebug in Firefox and type “document.cookie” in the console window.
This will show you all  cookies for a given website.

Cool isn’t it?