Today, I encountered such a depressing debugging problem :(

Source: Internet
Author: User
Tags ultraedit

Today is really depressing, it was very busy, because tomorrow the boss will watch a milestone demonstration, and my colleagues in the team will catch up. It was just a hope of victory, but it was down when I came back for debugging in the afternoon. It's not because machines are down.

ComplexCodeI have basically finished writing it, and I have tested it many times. The work at hand is assembly. However, there will be a lot of modifications during assembly. Although there are not many changes, there are a lot of changes to be made, so we need to coordinate the components with the page. It was quite good at first, and there was no problem. Everything went smoothly, and gradually saw the outline of the system. However, unfortunately, it is coming without knowing it. The code is running properly and an error is returned:

These two errors are jumped out. At a glance, we can see the details of the first error, and we know everything about JavaScript, the browser is often very crazy about syntax errors (we will see later that this theory is indeed correct ). I was very happy at first, so I began to find errors in the file defining dimtreetab. But I saw it. I saw it for a long time. I didn't see any syntax errors, let alone a few. Although I once said that vs. Net can be used to debug scripts conveniently, the debugger is generally useless for syntax errors of stupid. The result is useless.

After reading the last half a day, I commented out a lot of changes that have been made, and I still thought the wrong line was like this:

This line is also wrong. Have you ever learned JavaScript ?! It also says ";" is missing. % ^ (& * # * % ^ %. Have you found a bug in the script parser? No, this statement will be used as a JS Code. It is impossible!

Continue to go down. I 've been suffering from this problem for nearly an hour, and I have blocked a lot of code that I have already prepared. If you don't have any tricks, you will get confused, so you can repeat this line of code on this line of statements. The two lines of statements are exactly the same, and we still don't see the problem. I deleted the original row again, so it was easy to use it. No error !!! Is it so smiling? This is OK? So I immediately thought that the sentence may contain invalid characters, and it would still be "invisible. Open ultraedit, copy the two lines of code, and check whether the hexadecimal mechanism is enabled. The wrong line of code contains an extra "\ t ". In ultraedit, the original result is:

For (VAR I = 0; I <this. m_panels.length; ++ I)
For (VAR I = 0; I <this. m_p anels. lenth; ++ I)

Kao, play with me? It cannot be seen that debugging is still performed.ProgramWhat about it?

It's really embarrassing. Because my vs. Net fonts are not wide, the effects of the two lines of code in IDE are as follows:


The red arrow points to the "\ t" position. Who can see it ?!. However, I also blame myself for not knowing anything and then pressing "\ t". What else Is that accurate...

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.