One debug experience

Source: Internet
Author: User

Later on Friday, the Department released a "Doomsday" product. Our team participated in the development of the office plug-in. This is an important node. After the product was released and installed and deployed on a colleague's machine, the Office plug-in found a serious bug, that is, when you open an existing Excel file, our plug-ins cannot be loaded normally, because during development and debugging, Excel software is directly selected as the startup item, so that each time an excel program is opened directly, rather than a file. When I checked this bucket, I found another relatively strict bucket. After the excel was closed, the process of excel.exe in the task manager was not closed. I noticed this bug in the development stage and thought it was only available during debugging at the development stage, so I didn't care too much about it. As a result, after responding to the leaders, the leaders said whether the bug can be fixed or not. If not, they should pay attention to the problem during the test. I can say yes, but it takes a little time. Another colleague and I started looking for a solution. I tried several solutions and the problem was still not progressing. As I asked my colleagues to go back early after the weekend, I checked the problem for a while and there was no progress.
I felt a little tired, so I went home with two books I just bought. When I come back, I will use hot water to soak my feet after washing. I thought about how to solve the problem, so I turned on my computer and searched for some solutions online. So I posted my first question on msdn with a lame English. In the past, I used to look for answers or answer other people's questions on stackoverflow.

After sending the message, a guy replied to me in less than a few minutes, a little excited. This means that your code may fail to be loaded due to a problem. You can use system. Diagnostic. Debugger. Break () for debugging. At first I thought I did not answer my questions, but suddenly I understood something. However, it is too tired to be sleepy.
The next afternoon, I decided to go to the company and try the method just now. So I rushed to the company with no one in it. Open the computer and follow the prompts to modify the code. After compilation, run the Excel file directly from Visual Studio and find that the Excel file prompts that there is a breakpoint in the Code. Do you want to debug it, I am very happy to see this pop-up box, so Visual Studio is called up and can be debugged gradually, or even if you use attach process, there is no way to debug this problem. I suddenly felt that the answer that the guy gave me was too valuable. He seemed to understand that I didn't know how to debug an external EXCEL program. With this help, I immediately located the problem. An error occurred while loading the. xla file, that is, loading the User-Defined Function. As a result, I tried to find an answer on the Internet based on the description of the question. Because the root user installed a Chinese version of Visual Studio, the prompt information was in Chinese, which is very troublesome, because the problem cannot be found on the Chinese website based on the Chinese error information, the error prompt is translated into English, and the problem is found on msdn at once, as shown in. Therefore, the development tool in English version can not only install 13, but also greatly improve work efficiency. Change to the latest version of vs2012.

The point is the second sentence in the Middle English. That is to say, files loaded externally like xla are managed by the add-in manager, but this manager can only work normally when there is a visible open Excel Workbook. When you open an Excel file directly, Excel will help you create a new default Workbook. When you want to create a workbook, the plug-in needs to be loaded before opening the file, because Excel determines that a user opens a workbook, it does not create a default Workbook. In this case, the plug-in loads the workbook. an error is reported for the xla UDF.

After the problem is fixed, the system starts to solve the problem that the background process is not closed after the plug-in is logged on and the Excel file is closed. So I finally found a satisfactory answer on stackoverflow after a Google call:

Therefore, according to the above ideas, the test on the local machine is okay, so we have tested the XP system on the Virtual Machine and the 03 system. It is estimated that the XP memory management is not good, as a result, it still cannot be recycled, But it solves more than half of the problem. Let's take a look at it next week. It took about one and a half hours to fix these two bugs ......

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.