Google News
logo
jQuery - Interview Questions
Explain the different ways in which we can debug jQuery.
There are few ways in which we can debug jQuery code.
 
Modern-day browsers such as Google Chrome, Mozilla Firefox, Opera and Safari have built-in Javascript debugger. To debug the jQuery code, Press F12 from your keyboard and the browser with the built-in debugger will open a UI, wherein select the ‘Console’ menu. The error will be displayed in the console menu if any.
 
You can write console.log() into the code to get the error text, you can also write debugger; in between the code line, due to debugger the script will start in debug mode, pressing F12 into the browser will open console which will debug the code, pressing F10 will read values of the jQuery objects, and this is how we can debug jQuery code.
Advertisement