- 1
We want to tune the JSON data see, here does not involve the interaction with the background.
- 2
We open the developer tools in chrome and open them like, we can also use the shortcut key F12 to open. Select the files we want to debug, and believe you can find, ^_^.
- 3
Set breakpoints settings, I set the breakpoint in line 11, set the method to the left click on it, I love this breakpoint, it looks really beautiful. Refresh the page to perform such as:
- 4
Before we go down, we just type JSON (our object name) and look at the structure of the object, so we can see very clearly what the JSON is, without much explanation, such as:
- 5
Press F10 down, we enter our variable name in turn, in this case 3 methods are the same, debugging results such as:
- 6
If you're still using alert () to debug the JS code, discard it. Of course, this is only a very very simple entry-level article, more exciting to be found by you! Google Chrome has too many advantages, and if you haven't, it's highly recommended that you experience Internet boss's masterpiece Google chrome!
Google Chrome Debugging JS Getting Started