Javascript Debugginghttp://forums.asp.net/t/1082063.aspx/1?Javascript+DebuggingMon, 17 Nov 2008 10:51:21 -050010820631602615http://forums.asp.net/p/1082063/1602615.aspx/1?Javascript+DebuggingJavascript Debugging Is the issue where you cant set a breakpoint on the first line of a function fixed in orcas?&nbsp; I've got no idea how many times i've had to do something like this:&nbsp;<pre class="prettyprint">function foo(){ var q = 0; q = 1; // actual code begins here var myDiv = document.createElement(&quot;div&quot;); ...</pre>&nbsp;just so I could set a breakpoint on line 5.<br> 2007-03-02T16:45:51-05:001603170http://forums.asp.net/p/1082063/1603170.aspx/1?Re+Javascript+DebuggingRe: Javascript Debugging <p>I've forwarded your question to a Javascript expert on my team.&nbsp; The Javascript Intellisense and&nbsp;debugging support&nbsp;has vastly improved, so I think it's likely the issue has been fixed.&nbsp; </p> 2007-03-03T02:29:33-05:001603820http://forums.asp.net/p/1082063/1603820.aspx/1?Re+Javascript+DebuggingRe: Javascript Debugging <p>Putting a breakpoint on the first line of a <b>named</b> function should be working in VS 2005.&nbsp; This seems to be the example you provided.</p> <p>Putting a breakpoint, however, on the first line of an <b>anonymous</b> function does not work in VS 2005.&nbsp; This includes functions of the type: var foo = function() ...<br> <br> Unfortunately this a bug with jscript.dll that ships with windows and we were unable to address this just yet in the Visual Studio &quot;Orcas&quot; CTP either.&nbsp; I'm working on figuring out a way around this but I can't promise anything just yet. =)<br> <br> <br> &nbsp;</p> 2007-03-04T00:40:44-05:001605352http://forums.asp.net/p/1082063/1605352.aspx/1?Re+Javascript+DebuggingRe: Javascript Debugging <p>Ahh, yeah i've actually been doing this mostly in anonymous methods like:</p> <p>MyClass.prototype.method = function(){</p> <p>&nbsp;</p> <p>do you think doing something like:</p> <p>MyClass.prototype.method = function MyClass&#36;instance&#36;method(){&nbsp;</p> <p>to give the method a proper name would help any?&nbsp; or would it still be treated as an anonymous method since it's being called via a Function object?<br> &nbsp;</p> 2007-03-05T13:23:33-05:001606198http://forums.asp.net/p/1082063/1606198.aspx/1?Re+Javascript+DebuggingRe: Javascript Debugging <p>That won't work either.&nbsp; It's not so much the anonymity of the function, its more of the fact that you have a variable declaration and a function declaration back to back.&nbsp; I'm afraid there's no better work around than to have some &quot;filler&quot; line of code on the first line.&nbsp; We'll be working to properly fix this in the meanwhile.&nbsp; Sorry I don't have better news.</p> 2007-03-05T22:26:12-05:002513974http://forums.asp.net/p/1082063/2513974.aspx/1?Re+Javascript+DebuggingRe: Javascript Debugging <p>&nbsp;Has this been fixed yet?<br> </p> 2008-07-25T08:53:10-04:002514688http://forums.asp.net/p/1082063/2514688.aspx/1?Re+Javascript+DebuggingRe: Javascript Debugging <p>AFAIK no.&nbsp; I still see the issue.&nbsp; The workaround I use is to put the following 3 lines at the top of every function:</p> <p>var aweraser = 0;<br> aweraser = 1;<br> aweraser = 2;</p> <p>You should be able to debug normally starting at aweraser = 2<br> </p> 2008-07-25T13:49:53-04:002749978http://forums.asp.net/p/1082063/2749978.aspx/1?Re+Javascript+DebuggingRe: Javascript Debugging <p>&nbsp;winter is coming, and the days are getting longer, aren't they? two days can get reeaaallyyy long.<br> </p> 2008-11-17T10:51:21-05:00