How to debug the javascript in asp.net?
Solution 1
You could do following
- Use
debugger
keyword with .Net IDE. In your javascript on your page. something like this. - Use F12 Developer tool with IE browser.
- Use FireBug with Firefox.
- 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.
Related videos on Youtube
Jui Test
Updated on June 04, 2022Comments
-
Jui Test almost 2 years
I want to know ,how to debug javascript in asp.net?Can I apply break point to javascipt?
-
PaperThick over 11 yearsFirebug for Firefox is the best choice
-
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 over 11 yearsYes, I must agree :) Google Chrome dev tool is not buggy at all. But I use Firebug, since it has lots of extensions..
-