How to Debug Javascripts - Part1 (Internet Explorer)

If you are involved with web development then at some point you may wanted to debug Javascripts that you put in to your web pages. The problem is how to debug them. When I first started using Javascripts few month back I didn't knew a debugger to use with Javascripts. So what I did was to put alerts every where to find out the problem. But that was not a good method. So I did a research on Javascript debuggers. After few minutes of Google search I found few good tool that can be used to debug Javascripts. With this post I'll show you how debug in Internet Explorer, and later with another post I'll explain how to debug with Firefox.

With IE you can use Microsoft Script debugger and Visual Studio as debuggers.

You can download it form Microsoft website.
To use the debugger, first you have to enable script debugging. Go to tools- options- tab. Make sure that “Disable Script Debugging (other)” and “Disable Script Debugging (Internet Explorer) are NOT checked.




















Now you are ready to debug. Use View- View- Debugger- at next statement to run Debugger. This will break the execution on the next Javascript call and will open the debugger.

















Alternately, you can put a line like this in your Javascript code.
debugger;
It will create a breakpoint automatically.

















If any exceptions occurred in javascript execution IE will show a message asking whether to debug or not.










Select yes. Then it will display possible set of debuggers.




















Now you are debugging. Just step into as you do in any 0ther debugger.



You can use command window to to execute codes. From this little window you can easily check and re-assign values (at "run-time") to any of the variables that have been defined. Launch it from the View menu of the debugger or by clicking the button on the very right-hand-side of the toolbar.













I created a webpage which contains buggy Javascript. If you wish you can use that to test the debugging.
http://sandarenu.googlepages.com/javascriptdebugg
 

Yahoo Mail Tips and Tricks


Yahoo Mail Beta


While I was browsing the web today I came acrose an interesting blog post on Yahoo mail beta tricks. I'm not using my yahoo mail regularly since internet connection slowness. It is a headaches to use new beta UI with a slow internet connection. It takes lots of time to load a email. But it a nice UI, with very nice use of AJAX.

If you are using Yahoo mail beta this will be a good help to improve your efficiency.



Top 11 Yahoo Mail Tips and Tricks />


Technorati Tags:
 

New Features to My Blog

I added few new features to my blog. I changed my label section in to Tag Cloud. This was a feature I wanted to add to my blog for some time. I finally managed to find a method to do that. I had to modify my template for that. I found the code and the instruction to do it in phydeaux3 blog. He has given all the instructions on how to do it. I just copied and pasted the code.....
Here's the result, Nice ha...
Other new feature I added was showing related post user go to a specific post in my blog. Related items are taken according to the tags given to that post. You can find the method to do it from Hoctro's blog.

Try these hacks and enjoy......

Technorati Tags:
 

Tribune to Heros

Tribune to Heros
We will never forget the sacrifices you made to protect our country....

Subscribe


Get Google Toolbar Button

Enter your email address:

Delivered by FeedBurner