Debugging Javascripts in Visual Studio 2005

Most of you have probably already heard that in this version of Visual Studio (2005) it is possible (but really possible) to debug Javascripts.

Well it is true, and to be honest it works pefect! It saved me a lot of time while writing many Javascript (espacially with AJAX or DOM), but there is one small trick with the debugging of Javascript.


The problem is when you have Javascript blocks in header of your .aspx page, there is no possibility to place a breakpoint in that part of the code (at least so says the IDE), but there is small workaround for that too:

All you have to do is to intentionaly make an sintax mistake in your Javascript block and the Debugger will stay there and report Sintax Error. All you have to do is to jump the line and you are in Debugger!

 


Posted Apr 05 2006, 05:08 PM by Armin Kalajdzija
Filed under:

Comments

Damir Dobric wrote re: Debugging Javascripts in Visual Studio 2005
on 04-05-2006 17:47
I love Java-Script debugger. It is just big challenge. Here one more workaround. I found out that the script debugging works well if you implement the JAVA-script code in the separated .JS file and then include that file.

Damir

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
developers.de is a .Net Community Blog powered by daenet GmbH.