Debugging javascript from Visual Studio

    1. Open the Tools > Internet Options and click on Advanced tab.
    2. Uncheck “Disable script debugging” in the settings list.

    3. Now for any function where you want to debug just specify debugger; like this.

      Example

$(document).ready(function () {


debugger;

     alert(“hello world!”);

}

  • That’s all! Now just run the application in debug mode from visual studio debug it.