Javascript debugging, breakpoint in first line issue

Last post 11-17-2008 6:49 AM by Deven7. 7 replies.

Sort Posts:

  • Javascript debugging, breakpoint in first line issue

    04-30-2008, 4:49 AM
    • Member
      2 point Member
    • Deven7
    • Member since 04-30-2008, 4:44 AM
    • Posts 5

    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!

     

  • Re: Javascript debugging, breakpoint in first line issue

    04-30-2008, 7:46 PM
    • Contributor
      4,623 point Contributor
    • Joël Hébert
    • Member since 07-20-2005, 6:07 PM
    • Ottawa Canada
    • Posts 679
    • TrustedFriends-MVPs

    just put debugger; wher you want it to break and it will

    that is what I do

     

    Joël Hébert [MVP ASP.NET]

    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
  • Re: Javascript debugging, breakpoint in first line issue

    04-30-2008, 10:13 PM
    • Member
      47 point Member
    • petersgyoung
    • Member since 08-22-2007, 6:22 AM
    • Hong Kong
    • Posts 18

    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.

    petersgyoung
  • Re: Javascript debugging, breakpoint in first line issue

    05-01-2008, 1:10 AM
    • Member
      191 point Member
    • madhur25
    • Member since 01-10-2008, 3:20 AM
    • Hyderabad
    • Posts 91
    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.
    >
    Madhur Ahuja

    http://madhurahuja.blogspot.com
  • Re: Javascript debugging, breakpoint in first line issue

    05-01-2008, 3:33 AM
    • Member
      2 point Member
    • Deven7
    • Member since 04-30-2008, 4:44 AM
    • Posts 5

    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:

    1    var myfunction = function(myParam) {
    2       myParam.myMethod();
    3    };
    

      
    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? 

     

  • Re: Javascript debugging, breakpoint in first line issue

    05-01-2008, 6:32 AM
    • Contributor
      4,623 point Contributor
    • Joël Hébert
    • Member since 07-20-2005, 6:07 PM
    • Ottawa Canada
    • Posts 679
    • TrustedFriends-MVPs

    var myfunction = function(myParam) {

    debugger;
    2       myParam.myMethod();
    3    };

    debugger fires the debugger at that line give it a try forget the breakpoint

    Joël Hébert [MVP ASP.NET]

    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
  • Re: Javascript debugging, breakpoint in first line issue

    05-01-2008, 6:42 AM
    • Member
      2 point Member
    • Deven7
    • Member since 04-30-2008, 4:44 AM
    • Posts 5

    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 

  • Re: Javascript debugging, breakpoint in first line issue

    11-17-2008, 6:49 AM
    • Member
      2 point Member
    • Deven7
    • Member since 04-30-2008, 4:44 AM
    • Posts 5

    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 :-)

Page 1 of 1 (8 items)