How to debug JS code in chrome browser

Before writing more complex code, let's talk about debugging.

Debugging is the process of finding and fixing errors in a script. All modern browsers and most other environments support debugtools - a special user interface in the developer tools that makes debugging easier. It also allows us to step through the code to see what is actually going on.

Here we will use Chrome (Google Chrome) because it has enough features that most other browsers have similar features.

Resources (Sources) panel

  • Open the sample page in Chrome .
  • Use the shortcut key F12 to open the developer tools.
    Select the Sources panel.

If it's your first timeÿ

Guess you like

Origin blog.csdn.net/weixin_35770067/article/details/131486968