How to debug JQuery?

 Posted by Niladri.Biswas on 7/19/2012 | Category: jQuery Interview questions | Views: 142468 | Points: 40

1.Placing debugger keyword

Add the keyword debugger to the line from where we want to start the debugging and then run the Visual Studio in Debug mode by pressing F5 or using the Debug button.

<script language ="javascript">

$(document).ready(function ()
var btnObject = $('#btnSayHello');
debugger; ()
alert("Hello World...My First JQuery Program");

2.Inserting a break point after attaching worker process

Press ALT + CTRL + P or tools -> AttachProcess then choose w3wp.exe .

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response