SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast xarzu's Avatar
    Join Date
    Apr 2007
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How does one go about debugging javascript?

    How does one go about debugging javascript?

    Do you use firebug and run your page through your localhost?

    If javascript is part of an ASP.NET application, I have found that the breakpoints in a .js file in Visual Studio seem to be ignored.

    The problem I see is that the ASP.NET application which uses javascript code has too versions -- a published and a debug version. The Debug version is located within my group of folders under the localhost. Also, when I launch the program through Visual Studio, it defaults to IE. Is there some way I can have it launch a different browser that will allow for javascript debugging?

    Is there a step-by-step description somewhere?

    Javascript seems to be very popular. I imagine a debugger is in use. So, what is it and how can you use it if your javascript is already part of an asp.net web site/page?

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    6,002
    Mentioned
    219 Post(s)
    Tagged
    12 Thread(s)
    Hi,

    All modern browsers have a pretty powerful set of debugging tools built into them.

    I normally use Chrome: https://developers.google.com/chrome...ript-debugging

  3. #3
    SitePoint Guru etidd's Avatar
    Join Date
    May 2011
    Location
    atlanta, ga
    Posts
    632
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,862
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    With Internet Explorer or Chrome just press F12. For Opera hold down Ctrl and Shift and press I. Only Firefox doesn't have a debugger built in.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  5. #5
    Community Advisor bronze trophy
    fretburner's Avatar
    Join Date
    Apr 2013
    Location
    Brazil
    Posts
    1,440
    Mentioned
    45 Post(s)
    Tagged
    13 Thread(s)
    Quote Originally Posted by felgall View Post
    Only Firefox doesn't have a debugger built in.
    Firefox 23 seems to have... Ctrl + Shift + S

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,862
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by fretburner View Post
    Firefox 23 seems to have... Ctrl + Shift + S
    I guess that they are not too many years behind Internet Explorer now then IE has only had one built in since version 8.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •