Depending on Your Browser:
1.Firefox: There is a plugin called Firebug, its a built in tool in recent version of Firefox
2. Chrome and Safari: built in tool like Firebug you can find it by right-click mouse on page and choose (Inspect Element)
3. Opera: Built in tool or may you need to download called (Dragonfly)
4. IE: i recommend you to install Companion JS (http://www.my-debugbar.com/wiki/CompanionJS/HomePage), it will help you on IE browsers in general.
this depends on the browser that you are using:
Chrome includes a web developer tool, you can activiate it by opening the menu, selecting Develop Tools from tools sub menu. then from the bar you can trace the javascript application from the tab "Console"
Recent versions of Firefox comes with a build in developer tool, but most developers prefers the famous plugin "FireBug"
Recent Microsoft browsers offers a developer tool that can be activated by hitting F12, for older versions of Internet explorer a package must be installed in order to have debugging support from the browser.
par
Amr Olabi , Technical Team Lead , Smart Charging Technologies
Javascript is client side script, so you need to think about browser tools.
There are many tools that help you for that task, some of them are built in from browser, like: web developer tool for Chrome, and other can be installed as extensions, like "Firebug" for Firefox.
par
Hazem Salama , Senior Member of Technical Staff , Verizon Communications
Firefox Firebug addon is a very handy tool if you are using FF. Just click on the Script tab and you can click in the left margin to create a break point. It has most features as a regular debugger, step-in, step-out, etc. Other browsers have equivalent tools either built in or as an extension. Most people I know like Google Chrome, but I never tried it personally.
Mozilla Firefox is a great browser specially for Web Developers. It has some very useful tools for debugging during your page/script execution. Firebug is one of those add-on. Just install the Firebug in your Mozilla Firefox browser, from the link below:
http://getfirebug.com/javascript
this link will lead you to the specific javascript debugger under firebug. With this utility you can trace your scripts, run it step by step or can stop execution on any specific point or set breakpoints. Install this wonderful utility, you'll start loving this.
There are also some other ways, but trust me after having this you won't have to worry about anything else.
JavaScript Debugger and Tracer Tool use this tool it is very useful :
http://www.codeproject.com/Articles/17306/JavaScript-Debugger-and-Tracer-Tool
http://serkanyersen.blogspot.com/2007/03/javascript-debugger-and-trace-tool-new.html
par
Sohaib AlZyoud , Senior Software Engineer , Secured Services Systems (SSSIT)
there is alot of ways for doing this
from visual studio it self
1- put a break point in the javascript line you want to start debuging from and press, the play button in the tool bar to start debuging the application
the solution will be rebuiled and the execution will begin once the execution reached the break point you added execution will stop there (this way is similar to c# debuging)
2- just type "debugger" keyword in before the line you want to start debugin from, build the solution and bowse the page from your browser, when the execution reach "debugger" keyword it will stop and show a message to you to confirm start debuging
3- or you can use an browser extension like firebug