How to debug client-side javascript within vs2005 ....

Last post 02-28-2007 5:44 AM by stmarti. 18 replies.

Sort Posts:

  • How to debug client-side javascript within vs2005 ....

    01-23-2007, 9:13 AM
    • Loading...
    • Pablo1000
    • Joined on 01-23-2007, 2:02 PM
    • Santander
    • Posts 21

    Hello,

     I'm working on a webapplication in VS2005.

    I've got javascript debugging working with 'script explorer ' ... but I recently ran into compatibility problems with firefox browsers.

    Now I wanto to be able to switch between IE7 and FF -- which I managed to do with "file->browse with->set as default" option.


    However ... in this situation, debugging works really fine (including javascript files) with  IE, but debugging javascript source files does not work with FireFox!!

    When I try to debug ... I get the following symptoms after pressing F5:

    - App running in debug mode. c# is being debugged

    - Script Explorer screen is emtpy

    - Break points in js files which originally are solid red color, turn light and show the hint :"No symbols loaded ...."


    Does anyone have a tip on how to fix this?

     

    Paul 

     

     

  • Re: How to debug client-side javascript within vs2005 ....

    01-23-2007, 9:43 AM
    • Loading...
    • Pablo1000
    • Joined on 01-23-2007, 2:02 PM
    • Santander
    • Posts 21
    Maybe I should add to the previous psot that I'm working on xp, not vista!
  • Re: How to debug client-side javascript within vs2005 ....

    02-02-2007, 1:37 AM
    • Loading...
    • mohankrr
    • Joined on 02-02-2007, 6:34 AM
    • Posts 1

    The easiest way to debug javascript in VS2005 is to enable script debugging in IE and using the debugger statement. See this blog entry..

    http://mohansmindstorms.spaces.live.com/Blog/cns!69AE1BEA50F1D0E7!233.entry

    Filed under: , ,
  • Re: How to debug client-side javascript within vs2005 ....

    02-02-2007, 4:29 AM
    • Loading...
    • Pablo1000
    • Joined on 01-23-2007, 2:02 PM
    • Santander
    • Posts 21

    @mohankrr

    Your post does not once talk about the question I posted. Did you read it at all?

    Paul

  • Re: How to debug client-side javascript within vs2005 ....

    02-02-2007, 8:33 AM
    • Loading...
    • stmarti
    • Joined on 06-06-2006, 8:20 AM
    • Posts 699
    Pablo1000:

    Does anyone have a tip on how to fix this?

    Hi,

    Same for me, but... 

    I think there is no way and "need" to fix it, because vs 2005 hasn't got this feature(?) The ide supports only IE for javascript debugging. But maybe I'm totally wrong about this.

    The only way to debug script in firefox to use the debugger statement (as mohankrr said and it works for firefox also) and using some decent javascript debugger extension (firebug perhaps?).


  • Re: How to debug client-side javascript within vs2005 ....

    02-02-2007, 9:27 AM
    • Loading...
    • Pablo1000
    • Joined on 01-23-2007, 2:02 PM
    • Santander
    • Posts 21

    Thanks for your reply... although it actually tells the same thing I was afraid for ...it sounds like no ... not possible in vs2005??

    FireBug I used.Compared to debugging in VS2005-IE style FireBug is really not adequate.

    In theory ... Who is capable of fixing this shortcoming? Is it a 'missing' feature of VS2005,or should FireFox get yet another extension???

     I'm not into the architecture of debuggers enough to understand how this works ....

     Hopefully more people would like this feature to work and can comment on it.

     Paul

     

     

     

     

  • Re: How to debug client-side javascript within vs2005 ....

    02-04-2007, 11:35 PM
    Unfortunately Firefox does not provide any support for Visual Studio debugger. Debugger cannot just attach to FireFox and automagically locate running script documents. Browser needs to provide compatible interfaces to enumerate running documents, set and locate breakpoints and notify debugger when scripting engine reaches certain statement. FF does not provide any of this or at least does not provide in a form compatible with VS.
    Thanks

    ------------------------------------------------------------

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: How to debug client-side javascript within vs2005 ....

    02-05-2007, 4:13 AM
    • Loading...
    • Pablo1000
    • Joined on 01-23-2007, 2:02 PM
    • Santander
    • Posts 21

    Thanks Mikhail for the explenation.  That makes it clear.

    So this means that the FF developers should implement the required functionality in FF, and if they do that correctly, we can use it within VS2005?

    Or would VS2005 also require adjustements, after eventual changes of FF?

    Thanks for your answer!

  • Re: How to debug client-side javascript within vs2005 ....

    02-07-2007, 3:13 AM
    • Loading...
    • stmarti
    • Joined on 06-06-2006, 8:20 AM
    • Posts 699

    Mikhail Arkhipov (MSFT):

    FF does not provide any of this or at least does not provide in a form compatible with VS.

     

    Hi,

    I'm not a firefox expert, but I'm sure that firefox provide the necessary (documented) debugging interfaces (and many more). If not, how would even works "firebug", "web developer" and other popular extensions?

    I think firefox will never provide the same interfaces as ie, so MS needs to spend time to develop a firefox compatible debugger. A new firefox compatible debugger would be nice in the "near" future. But maybe I'm only dreaming.

  • Re: How to debug client-side javascript within vs2005 ....

    02-07-2007, 7:11 AM
    • Loading...
    • Pablo1000
    • Joined on 01-23-2007, 2:02 PM
    • Santander
    • Posts 21

    Thanks stmarti for your ideas on this. It indeed sounds logical.

     Would this mean we have three options?

    1)  Extend VS to support debugging capability of FF?

    2) Extend FF to support debugging capability within VS?

    3)  A bridging module, connecting the 2 debug-interfaces??? (could this be valid??)

    In case number 3 is valid ... this would certainly be a high-profile project for the developer who pulls this-one off.

    Please comment on the validity of the above three options!!

     

     

     

     

  • Re: How to debug client-side javascript within vs2005 ....

    02-07-2007, 2:54 PM
    Visual Studio SDK provides interfaces and documentation on how to implement debugging engine. VS SDK also supported in VS Exxtensibility forums for VS IDE folks.
    Thanks

    ------------------------------------------------------------

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: How to debug client-side javascript within vs2005 ....

    02-07-2007, 5:04 PM
    • Loading...
    • Pablo1000
    • Joined on 01-23-2007, 2:02 PM
    • Santander
    • Posts 21

    Thanks Mikhail,

    This means that option 3 is feasible... assuming that FireFox also provides information on how to extend FF?

    Do you have any idea if this would be a big project?

     

     

     

  • Re: How to debug client-side javascript within vs2005 ....

    02-08-2007, 4:34 AM
    • Loading...
    • stmarti
    • Joined on 06-06-2006, 8:20 AM
    • Posts 699
    Pablo1000:

    assuming that FireFox also provides information on how to extend FF?

    Because firefox is a real free and opensource software all info is also free and open for it. Firefox has tons of free and good extension (but beware there are also bad quality extensions). In ie7 I've only found commercial extensions yet, which is a joke. But this is totally off-topic Smile

    Anyway the 3rd option is the most promising, probably it needs a firefox extension which works similar as ie6/ie7: when it encounters a bug or a debugger statement in javascript we get a popup  with the option to connect to vs for debugging.

    The script explorer window support - I think - is a different story.  

  • Re: How to debug client-side javascript within vs2005 ....

    02-08-2007, 5:03 AM
    • Loading...
    • Pablo1000
    • Joined on 01-23-2007, 2:02 PM
    • Santander
    • Posts 21

    Hello stmarti,

    So, option 3 it's going to have to be then....? Perfect.

    Mikhail ... do you agree?

    stmarti ... why would the script explorer window part of the integration be a different story??

    IMHO a fully functional equivalent is needed/required to get a good development experience. Do you not agree?

    What you describe is a situation which closely resembles the current facility of FireBug.

    Any tips on finding a developer for this?

     

  • Re: How to debug client-side javascript within vs2005 ....

    02-08-2007, 5:25 AM
    • Loading...
    • stmarti
    • Joined on 06-06-2006, 8:20 AM
    • Posts 699
    Pablo1000:

    stmarti ... why would the script explorer window part of the integration be a different story??

    Hi,

    I'm (still) not a debugging expert but I think we have two debugging scenario which needs different implementations:

    a) The browser found a js bug or a debugger statement and pass the debugging to the vs ide, where we can set additional break point. So the browser "attach" to vs ide. In theory this needs a ff extension and no ms work.

    b) In script explorer we set breakpoints. In that case the vs ide needs to "attach" to the browser, detect the used scripts, and handle the break points. But the opposite of this also possible: any browser continuously  scanning  for a debugging ide, provide the scripts, step into the scripts etc. I'm not sure how it really works (but the first seems more logical).
     

    Maybe Mikhail could clear this thing up.

Page 1 of 2 (19 items) 1 2 Next >