Debug Javascipt

Introduction

 
In visual studio, we can debug our code using a debugger. Using debugger we can execute code line by line and Examinee Result.
 
Sometimes we need to debug javascript code but using Visual studio we can not debug Javascript code.
 
There is some other method through which we can debug javascript code. 
 
Follow these steps:
 
1. For it, we require a PlugIn for our Browser. There are many plugIns on Web but "FireBug" is the best and widely  used Plugin
so install FireBug Plugin in your Browser.
 
Link are :
  • for FireFox: https://addons.mozilla.org/en-US/firefox/addon/firebug/
  • for GoogleCrome :getfirebug.com/releases/lite/chrome/
2.After installation Now you are Ready to debug your javascript code.
3.Right-click on Browser Screen and select  Inspect Element with Firebug
 
index
 
4. Now select Javascript  tab and select your javascript file which you want to Debug.
 
2
 
5. Now  put break point where you want to debug code and Reload Page
 
3
 
6. Use f11  for line by line debug and f5 key for debug b/w two break points.
 
So such that you can  debug your code and find output line by line