In Delphi 6, if the dynamic library code can be effectively debugged (by boring customers)

Source: Internet
Author: User

Recently, I have been studying Delphi 6. dll is used in the code written by my predecessors, and static and dynamic reading is available. The internal debugging method of DLL Code cannot be found during debugging, after trying for a few days, I also referred to a lot of methods on the Internet and finally found them on a foreign language website. Below I will summarize the methods. I would like to sum up the half of the translation. It should be said that 100% can be used for debugging, the following describes the detailed debugging steps for dynamic DLL reading:

DLL program settings:
Run-> pararneters: set local-> Host application to the application that calls the DLL.
Then start to debug the DLL or app
After the Debugging starts, break the point after loadlibrary. Note that
After the breakpoint arrives, view-> debug windows-> modules, right-click your EXE, select Add modules, and select your debug DLL.
At the end of the modules list, find the newly added DLL, right-click the menu, and select reload symbol table ..., select the DLL you have compiled and run it. OK. Then, you can see that the DLL code has been breakpoint debugged.

 

The debugging method for reading DLL in static mode is similar. When the app is started, it can directly find modules and reload symbol table.

 

Notes:

First, the DLL output directory should be set to your program running Directory, which is not easy to confuse.

Second, the DLL selected by reload symbol table must be the DLL you output, so that the debugging symbol will be correct.

 

Now, you are an absolute beginner in Delphi. Thank you for making a brick!

 

Bored customers

2008.1.15

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.