How to debug the javascript in asp.net?

18,018

Solution 1

You could do following

  1. Use debugger keyword with .Net IDE. In your javascript on your page. something like this. enter image description here
  2. Use F12 Developer tool with IE browser.
  3. Use FireBug with Firefox.
  4. Use Control - Shift - J to open Developer Tools and bring focus to the Console. for Google Chrome.

Solution 2

If you are using Visual Studio along with Internet explorer, you can debug javascript by simply applying breakpoints. Or else if you want to debug your javascript file in fire fox or chrome browsers you can make use of tools like Firebug @ http://getfirebug.com/

Solution 3

You can use firefox firebug or chrome tool.

for example:

you click in chrome examine the element and then in "Source" you select your script add breakpoints and debug it.

Solution 4

You can use Firefox but Firebug should be installed. Then, from Script tab, you should "Reload" to see all resources. After that, when you want to debug any line, put breakpoint to left side of code and when you reload the page debug will start and you can step into/ over / out, continue, rerun..

Solution 5

You can use Firebug tool in Mozilla browser it will notify all the error in your javascript, what java scripts are loaded, function call to javascripts are correct or not on run time.

Share:
18,018

Related videos on Youtube

Jui Test
Author by

Jui Test

Updated on June 04, 2022

Comments

  • Jui Test
    Jui Test almost 2 years

    I want to know ,how to debug javascript in asp.net?Can I apply break point to javascipt?

    • PaperThick
      PaperThick over 11 years
      Firebug for Firefox is the best choice
    • Uwe Keim
      Uwe Keim over 11 years
      "The best" is obviously a personal opinion. E.g. for me, the Google Chrome developer tools are "the best".
    • totten
      totten over 11 years
      Yes, I must agree :) Google Chrome dev tool is not buggy at all. But I use Firebug, since it has lots of extensions..