I avoided debugging javascript for a long time because 1) I didn't write a lot of it, and 2) it used to be a pain to do so with Visual Studio. Nowadays it's pretty easy, though, if you know how to do it.
You'll notice that if you open up your ASPX page in Visual Studio and try to set a breakpoint in javascript, you'll usually get a "This is not a valid location for a breakpoint" error. What you need to do is open up the client-side version of the page in Visual Studio and debug that. Here's how:
If the above annoys you, another javascript-debugging option is to instead use Firefox and Firebug, which I posted about briefly a few months back. Firebug is a powerful plugin that not only lets you debug javascript, but explore the DOM and watch AJAX requests. You can download it here.
Both approaches (Visual Studio and FireBug) have their merits. I suggest trying them both out to see which works for you.
Powered by: newtelligence dasBlog 2.0.7226.0
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2009, Ben Strackany
E-mail