Encountered error/problem troubleshooting ideas in front-end work

1. Look at the error message on the console and understand the error message.

Read the error message, understand the error message, and understand its meaning

2. Troubleshoot and report errors

1. Print the log console.log()
2. debugger
3. Simple error reporting can be solved directly according to the error information
4. If it is a logic problem in code writing, and it is a link between the previous and the next, comment the code and troubleshoot the problem step by step
5 . It is relatively rare to report errors like some configuration errors, post the error information on Baidu, and then find the answer to solve the problem. If Baidu can't solve the problem, then look for peers or more powerful seniors to ask for advice.

3. Thinking

If it is an error report at the logical level, after seeing the error message, think about it, sort out the written code, the function of each piece of code written in this way, and what impact it has, familiarize yourself with the code written in depth, and then check it in combination with the error message .

4. Continuous Learning

In the front-end field, it is necessary to keep learning continuously. Only continuous learning can improve one's own cognition in this field, accumulate more knowledge, step on more pitfalls, and accumulate continuously. When encountering problems, they can be easily solved. .

Guess you like

Origin blog.csdn.net/weixin_47818125/article/details/128589606