In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
What is the debugger JSDebugger based on JavaScript? I believe many inexperienced people don't know what to do about it. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
JsDebugger is a JavaScript-based debugger used to check the running status of an application. JsDebugger is a run-time inspection tool that allows you to delve into the details of the application or change the application logic dynamically. Breakpoint debugging is not that complicated. To simply understand that no outbound call is to open a browser, open sources to find the js file, and click on the line number. The operation seems very simple, but in fact, what many people struggle with is, where is the break point?
Where's the break point for jsDebugger?
Open the page in chrome browser → Press F12 Open developer tools → Open Sources → Open the js code file you want to debug → click on the line number, OK! Congratulations on your virgin breakpoint, .
How to hit the jsDebugge breakpoint?
The operation of breakpoints is simple, and the core question is, how can breakpoints be hit to find out what's wrong with the code? Let me give you an example to make it easier for you to understand.
Suppose we are now implementing a load of more functions, such as the figure above, but now there is a problem loading more functions, and the data is not loaded after clicking, what should we think of in the first place? (write the answer on a different line, you can see what your first reaction is.)
The first thing that comes to my mind is whether my click is successful or not. Does the method in the click event work? OK, if you want to know the answer to this question, let's try a breakpoint right away. Where is the breakpoint? Think about it for yourself.
Did you think of that? Yes, since we want to know if the click is successful, of course we add a breakpoint at the click event in the code, and remember not to add it on line 226, because the function being executed is a function in the click method, not a selector. The breakpoint has been hit now, and then what do you do? Think about it again and again.
To get to the point, the picture above is what happens after clicking the load more button, we can see that the page on the left is covered by a translucent layer, there is also a string of English and two buttons at the top of the page, and the 227 line of code on the right is added with a background color. when this happens, no matter what the English meaning of those buttons is, what information do you get from this picture? Keep thinking about it.
If the above picture occurs, it shows that the function in the click event has been called, further indicating that the click event takes effect. Then our first "criminal suspect" on this issue is excluded.
After reading the above, have you mastered the method of debugging program JSDebugger based on JavaScript? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.