Troubleshooting JavaScript Using Google Chrome Developer Tools

> Please navigate to https://googlechrome.github.io/devtools-samples/debug-js/get-started in your Google Chrome Browser Using Incognito Mode

> Please open the Developer Tools pane.

> Please click on the Sources tab

> Please click on the get-started.js file and its code will be displayed in the Code Editor pane, In the File Navigator pane, under the Network tab

> Please insert a line-of-code breakpoint to tell Dev Tools to pause the script execution

> To help you determine bugs/fixes for the code you are troubleshooting –at the particular line you choose.

> For this, just click on the number (at the left of the line of code) in the Code Editor pane

For example: click on line 32 of the get-started.js file.

> Please enter a value into the Number 1 and Number 2 fields on the actual page,

> Please click on the Add Number 1 and Number 2 button

> Please click on the arrow beside the Scope to expand the view to display the Local and Global variable options in the JavaScript Debugger pane

> Please click on the arrow beside the Local to expand the view to include the current values of the variables

> Please enter the following line of code into the Console:

parseInt(addend1) + parseInt(addend2)

> Please press enter key

> To replace the code at line 31 with the following code:

var sum = parseInt(addend1) + parseInt(addend2);

> Please press Ctrl + s to save the script 

> Please click on the Deactivate breakpoints icon

> Please click on the Add Number 1 and Number 2 button to recalculate

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to secure your WordPress?

WordPress is an open-source application so security level issues you may face but Do not worry...

Install themes into the wordpress

What is the WordPress theme? A WordPress Theme is a collection of files that work together to...

Top 5 e-commerce applications

What is e-commerce?   E-commerce (electronic commerce) is the buying and selling of goods and...

How to Install Wordpress Website?

WordPress is a free and open-source content management system (CMS) based on PHP and MySQL....

How To Check DotNetNuke Install Instance Version?

> Please login to your DNN site with your host account. > Please Navigate to Host >...

Powered by WHMCompleteSolution