Search code examples
delphidebuggingc++builderdelphi-xe5rad-studio

Debugging a package during component installation


I need to build old components made for BCB6 (Borland C++ Builder 6) in Embarcadero RAD Studio XE5. Projects are CPP- projects, and the component code is contained in the *.PAS - files. The project contain 6 packages:

  • three packages a design time
  • three packages runtime

First I build packages runtime. After that I start building and installing the packages design time that use packages runtime. And one design time package has a problem during installation:

enter image description here

I found a runtime package that causes this problem. My question is how do I find and resolve the following error? After all, when the package is installed, I cannot start the debugger, see the stack trace, nothing at all. What are the options? Thanks.


Solution

  • For that you need to run a second instance of the IDE in the debugger:

    • Uninstall the packages
    • Compile all packages with debug information
    • Load the project of the runtime package that causes the problem
    • In Run -> Parameters Set the Host application to $(BDS)\Bin\bds.exe
    • Press run with debug
    • This will start a second instance of the IDE. You might have to ignore some exceptions that it internally raises (and handles).
    • In that second instance, load the design time package which loads the runtime package that causes the problem
    • Hopefully you will now see what happens