Julie Lerman's DevLife

DevLife Part I [May 2005 - March 2007]

My Links

Blog Stats

News

A blog for DevSource.com.

This blog was originally part of the blogs.ziffdavis.com site from May 2005 through June 2007 when the blog was moved to the Movable Type blog engine and hosted at blog.devsource.com/devlife.
The original blog was eventually shut down and I was given the posts so that I could host them on my own site.


Archives

Another one of those "how did I miss it until now?" tools

One little word: “debugger”.

It is the evidence of my background in DOS and Win32 applications and not ASP or java. The only ways I knew to break into debug mode when testing out javascript was either to put a line of intentional garbage into the javascript or to use I.E.'s “break on next statement” setting. There are probably add-ons that enable this as well.

But recently I just happened to come across the debugger statement for Javascript when looking for something else.

By inserting the word debugger in your code, the debugger will break at that line and voila you are in debug mode.

As in

function SomeCodetoTest( )
{
  debugger
  dosomething( );
  dosomethingelse( );
}

posted on Tuesday, October 24, 2006 8:26 AM