Like the focus of the profession, seven points of study attitude.
JS: The full name Javascript,web, JS mainly in two places:
- HTML <script type= "Text/javascript" ></script>.
- JS script file, page reference js:<script src= "Js/***.js" ></script>
JS debugging is generally in the browser developer tool "debugger" tab page.
F12 Open the Browser developer tool.
Developer Tools
The main focus is on the left-hand code box and the right-side monitoring area.
Key points: breakpoints, monitoring, debugging tools.
A simple summary of the debugger is the breakpoint + monitoring + debugging tool.
Breakpoint
The debugger first adds breakpoints before running, letting the program stop at the breakpoint before monitoring and debugging.
Add a breakpoint: The line number left click, the breakpoint flag appears after the breakpoint is added, and the program is stopped at the breakpoint.
Breakpoint Monitoring
When the program stops at the program debugging interface, you can add objects that you want to monitor, including objects and formulas.
Add monitoring: Select an object or formula, right-click, add Monitoring.
Select the formula-right----add monitoring, and the right side gets the value of the object.
Formula Monitoring Debugging Tools
When the program pauses at the breakpoint can use debugging tools, step by step to observe the direction of the program.
Debugging Tools
Use the Step debugging tool to perform one line at a time, observe the program running steps, observe the running steps using "Enter debugging" into the calling method when encountering the calling method, and when the call hierarchy is deep, use "jump out" back to the outer layer of the method and use "Run" to finish debugging.
Code Search
In the debugging interface there is an input box to retrieve the current code content, content positioning, you can enter the direct positioning.
Code Search
Development tools for everyone has some of their own habits, the most suitable, most accustomed to their own groping, is the best.
Step by step, adhere to the accumulation, persist in learning.
Web Development Standard-developer tools-js Debugging