Click here to Skip to main content
15,886,513 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I am working on developing a web application using Asp.net(vb.net) with Visual studio.Sometimes I have to write small javascript functions in my page.For checking the correctness of those script I generally write temporary alert messege in different portions of my javascript function.Is there any better way to debug those scripts??
Posted
Comments
Hiren solanki 31-Dec-10 6:55am    
See my comments below my answer.

Yes, use IE "Developer Tool" to debug and when working with FireFox download and activate FireBug plugin which is also great for debugging, DOM model inspection and CSS rule inspection.
Of course you can also debug JS code with VS debugger when testing your web application.

Regards,
Manfred
 
Share this answer
 
v2
No need to write alert everytime.

Just put debugger; before the line you want to start debug.

And Set debugging in IE enabled.
 
Share this answer
 
Comments
Rounak Hasan 31-Dec-10 6:52am    
suppose I want to find a a java script error and want to debug all the scripts..Then where should I put the debugger; ...
Hiren solanki 31-Dec-10 6:54am    
before the line you want to start debugging, when compilation will hit that line it will take you to the source to debug it line by line as you're doing in Visual studio.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900