views:

271

answers:

3

I am having problems using the Visual Studio 2008 Javascript debugger. I can’t set the breakpoint on the first line of an anonymous function. Given that most Javascript is written using namespaces these days, this means that you can’t set the breakpoint on the first line of most Javascript function.

Looking on google (e.g this) and connect.microsoft.com this seems to be a VERY long standing problem.

However google is not good at finding new solutions to old problems, has anyone found a solution to this?

(As the web applicaion I am working on only works with IE6, I can’t use FireFox and it’s debuger for the Javascript, so am forced to use Visual Studio 2008 Javascript’s debugger. I think the application will also work with IE7, but our IT department will not let us install IE7 without a very good reason, as most of our customers are still on IE6 – hence I am starting to wish I was a java developer rather then a C# developer.)

+1  A: 

First ouch, sorry about your IT department and your inability to escape the hell that is IE6.

Secondly the best advice I have is to add a debugger; statement where you want your breakpoint.

JoshBerke
+1  A: 

Responce from Microsoft:

The issue you describe is within the scripting engine that comes with IE. I would say the good news is that we’ve fixed it in IE8.

Ian Ringrose
A: 

it is reproducibale in ie8 also

vinayak