I cannot find anyway to debug javascript in my VS2008 too. When press F5, VS2008 ignore all javascript breakpoints! Is it a bug?
In the previous version of VS, there is a dropdownlist (you can select debug or release). However, I cannot find this feature in my VS2008. How can I enable it.
Tools - > Options -> Enable Advanced Configuration (Something like this, don't remember exactly) "petersgyoung" wrote in message news:2331185@forums.asp.net... >I cannot find anyway to debug javascript in my VS2008 too. When press F5, >VS2008 ignore all javascript
breakpoints! Is it a bug? > > In the previous version of VS, there is a dropdownlist (you can select > debug or release). However, I cannot find this feature in my VS2008. How > can I enable it. >
Ok obviously it's not enough to write a link to the original post, because nobody reads it.
So here the description of the real Problem.
VS isn't able to put a breakpoint in the first line of an anonymous function.
Example:
var myfunction = function(myParam) {
myParam.myMethod();
};
You will not be able to debug the line, where myMethod is called, because it is the first line
of an anonymous function. The only way to workaround this problem is to put in a dummy line
like var debug = 1; or something.
Jeff King allready analyzed the problem in the original post, and discovered that it is within the jscript.dll
He also promised that this problem will be fixed properly, this post is nearly one year old now!!
So, are there any news on that? Is someone looking for the problem, or will the web 2.0 developers be ignored again?
Deven7
Member
2 Points
5 Posts
Javascript debugging, breakpoint in first line issue
Apr 30, 2008 08:49 AM|LINK
Are there still no news on this bug already posted here?
http://forums.asp.net/t/1082063.aspx
Do you guys realise that the visual studio has a reputation of beeing completely useless for javascript development??
Please fix this bug, and for us it is completely uninteresting if you have to fix in in the vs code or in the jscript engine.
STOP to search for excuses ==> FIX IT!
Joël Hébert
Contributor
4624 Points
679 Posts
MVP
Re: Javascript debugging, breakpoint in first line issue
Apr 30, 2008 11:46 PM|LINK
just put debugger; wher you want it to break and it will
that is what I do
Opulent ASP Development Inc.
www.opulentasp.com
Ottawa,Canada
Click "Mark as Answer" on the posts that helped you to help future readers to get the solutions
petersgyoung
Member
47 Points
18 Posts
Re: Javascript debugging, breakpoint in first line issue
May 01, 2008 02:13 AM|LINK
I cannot find anyway to debug javascript in my VS2008 too. When press F5, VS2008 ignore all javascript breakpoints! Is it a bug?
In the previous version of VS, there is a dropdownlist (you can select debug or release). However, I cannot find this feature in my VS2008. How can I enable it.
madhur25
Member
191 Points
92 Posts
Re: Javascript debugging, breakpoint in first line issue
May 01, 2008 05:10 AM|LINK
http://madhurahuja.blogspot.com
Deven7
Member
2 Points
5 Posts
Re: Javascript debugging, breakpoint in first line issue
May 01, 2008 07:33 AM|LINK
Ok obviously it's not enough to write a link to the original post, because nobody reads it.
So here the description of the real Problem.
VS isn't able to put a breakpoint in the first line of an anonymous function.
Example:
var myfunction = function(myParam) { myParam.myMethod(); };You will not be able to debug the line, where myMethod is called, because it is the first line
of an anonymous function. The only way to workaround this problem is to put in a dummy line
like var debug = 1; or something.
Jeff King allready analyzed the problem in the original post, and discovered that it is within the jscript.dll
He also promised that this problem will be fixed properly, this post is nearly one year old now!!
So, are there any news on that? Is someone looking for the problem, or will the web 2.0 developers be ignored again?
Joël Hébert
Contributor
4624 Points
679 Posts
MVP
Re: Javascript debugging, breakpoint in first line issue
May 01, 2008 10:32 AM|LINK
var myfunction = function(myParam) {
debugger;
2 myParam.myMethod();
3 };
debugger fires the debugger at that line give it a try forget the breakpoint
Opulent ASP Development Inc.
www.opulentasp.com
Ottawa,Canada
Click "Mark as Answer" on the posts that helped you to help future readers to get the solutions
Deven7
Member
2 Points
5 Posts
Re: Javascript debugging, breakpoint in first line issue
May 01, 2008 10:42 AM|LINK
as Is said, with a dummy line in the first line it works, the problem is that you cannot set the breakpoint in the first line.
It doesn't matter if you put var blah = 1; or "debugger" in the first line.
But thats no solution, thats garbage!
This is a known Bug, and it needs to be fixed, so pls keep your weird so called workarounds, they're not practical
Deven7
Member
2 Points
5 Posts
Re: Javascript debugging, breakpoint in first line issue
Nov 17, 2008 10:49 AM|LINK
another year is nearly over. a lot of things have changed. just this embarrassing bug is still not fixed.
hey microsoft guys, if you don't know how to do it, why don't you ask some people from mozilla, they might help you :-)