Debugging of Delphi applications (7) debugging DLL

Source: Internet
Author: User

Debugging DLL and debugging executable files are the same in most places. In the DLLCodeWhen a breakpoint is reached, the debugger pauses the execution of the DLL. Usually by creating a testProgramRun the test program in the debugger to test the DLL.

However, sometimes you need to test the DLL used by the executable file, and the executable file is created in other development environments. For example, to create a DLL that can be called by Visual Basic applications, you must not run a VB application under the Delphi debugger. All you can do is to tell the Delphi debugger, start the VB application as a main application (naturally, the main application must contain the code to load the DLL ). The run parameters dialog box is used to tell Delphi to start an external main application.

To display the run parameters dialog box, select the run | parameters menu item from the main menu, enter the EXE file name in the Host application field, and click load to run the main application. Shows the run parameters dialog box:

After the main application is started, you can use the Delphi test program to debug the DLL: Set the breakpoint in the DLL and start debugging.

Note

The run parameters dialog box has a remote page, which is used to set parameters for applications on a remote machine. Remote debugging is an advanced debugging content, which is not described here, as shown in:

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.