0

This question founded on this question. My IDE - RAD Studio XE 5 Architect Update 2. My problem:

When installing a design-time package, an exception is thrown in the run-time package being used. To do this, I need to debug this runtime package. When trying to debug package the breakpoint is always green color and in event log print text: 'No debug info'. My steps:

  • Open IDE and download the problematic runtime package
  • Assign a host to it with the IDE application
  • Start debugging
  • Wait for the second copy of IDE to start
  • On a new IDE instance, open the design-time package that is causing the problem
  • Start installing a design-time package

I see stack trace and exception, but breakpoint not working.

I maked test and created project group:

  • Probleming runtime package
  • Test application (VCL exe) from one procedure, which through procedure LoadPackage loading probleming runtime package
  • Set breakpoint in problem runtime package
  • Run debugger

Wonderful! Breakpoint is worked!

My question: how to make works breakpoint at debugging probleming runtime package through host application (IDE second instance)?

Thanks.

P.S.: Properties my runtime package:

  • Project Options -> Delphi Compiler -> Compiler -> Assertions -> True
  • Project Options -> Delphi Compiler -> Compiler -> Debug information -> Debug information
  • Project Options -> Delphi Compiler -> Compiler -> Local symbols -> True
  • Project Options -> Delphi Compiler -> Compiler -> Symbol reference info -> Reference info
  • Project Options -> Delphi Compiler -> Compiler -> Use debug .dcus -> True
  • Project Options -> Delphi Compiler -> Linking -> Debug information -> True
  • Project Options -> Delphi Compiler -> Linking -> Include remote debug symbols -> True
  • Project Options -> Delphi Compiler -> Linking -> Map file -> Publics
  • Project Options -> C++ Compiler -> Debugging-> Debug information -> True
  • Project Options -> C++ Compiler -> Debugging-> Debug line number information -> True

On output I have files: *.bpi, *.bpl, *.drc, *.lib, *.map, *.pdi, *.tds .

P.S.S.: when debugging with a project group, no exception is thrown, the problem only appears WHEN installing a design-time package

UPD 1:

I saw some kind of pattern. The * .dpk (delphi) project is debugged without problems. A project is a project *.cbproj (cpp) has problems with debugging. Here is a list of files:

Project test_runtime_package.dpk, include files:

  • test_runtime_package.dproj
  • test_runtime_package_delphi.pas

test_runtime_package.dpk

package test_runtime_package;

{$R *.res}
{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO ON}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS ON}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION OFF}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
{$REFERENCEINFO ON}
{$SAFEDIVIDE OFF}
{$STACKFRAMES ON}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
{$DEFINE DEBUG}
{$ENDIF IMPLICITBUILDING}
{$DESCRIPTION 'test_runtime_package'}
{$RUNONLY}
{$IMPLICITBUILD OFF}

requires
  rtl,
  vcl;

contains
  test_runtime_package_delphi in 'test_runtime_package_delphi.pas';

end.

test_runtime_package.dproj

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
        <ProjectGuid>{F046793E-2171-4D64-8090-C673864791BC}</ProjectGuid>
        <MainSource>test_runtime_package.dpk</MainSource>
        <ProjectVersion>15.3</ProjectVersion>
        <FrameworkType>None</FrameworkType>
        <Base>True</Base>
        <Config Condition="'$(Config)'==''">Debug</Config>
        <Platform Condition="'$(Platform)'==''">Win32</Platform>
        <TargetedPlatforms>1</TargetedPlatforms>
        <AppType>Package</AppType>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
        <Base>true</Base>
    </PropertyGroup>
    <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
        <Base_Win32>true</Base_Win32>
        <CfgParent>Base</CfgParent>
        <Base>true</Base>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
        <Cfg_1>true</Cfg_1>
        <CfgParent>Base</CfgParent>
        <Base>true</Base>
    </PropertyGroup>
    <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
        <Cfg_1_Win32>true</Cfg_1_Win32>
        <CfgParent>Cfg_1</CfgParent>
        <Cfg_1>true</Cfg_1>
        <Base>true</Base>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
        <Cfg_2>true</Cfg_2>
        <CfgParent>Base</CfgParent>
        <Base>true</Base>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Base)'!=''">
        <GenDll>true</GenDll>
        <DCC_CBuilderOutput>All</DCC_CBuilderOutput>
        <RuntimeOnlyPackage>true</RuntimeOnlyPackage>
        <DCC_OutputNeverBuildDcps>true</DCC_OutputNeverBuildDcps>
        <DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
        <GenPackage>true</GenPackage>
        <DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
        <DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
        <DCC_E>false</DCC_E>
        <DCC_N>false</DCC_N>
        <DCC_S>false</DCC_S>
        <DCC_F>false</DCC_F>
        <DCC_K>false</DCC_K>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Base_Win32)'!=''">
        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
        <VerInfo_Locale>1033</VerInfo_Locale>
        <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
        <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Cfg_1)'!=''">
        <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
        <DCC_DebugDCUs>true</DCC_DebugDCUs>
        <DCC_Optimize>false</DCC_Optimize>
        <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
        <DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
        <DCC_RemoteDebug>true</DCC_RemoteDebug>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
        <Debugger_HostApplication>C:\Program Files (x86)\Embarcadero\RAD Studio\12.0\bin\bds.exe</Debugger_HostApplication>
        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
        <VerInfo_Locale>1033</VerInfo_Locale>
        <DCC_Description>test_runtime_package</DCC_Description>
        <DCC_RemoteDebug>false</DCC_RemoteDebug>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Cfg_2)'!=''">
        <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
        <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
        <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
        <DCC_DebugInformation>0</DCC_DebugInformation>
    </PropertyGroup>
    <ItemGroup>
        <DelphiCompile Include="$(MainSource)">
            <MainSource>MainSource</MainSource>
        </DelphiCompile>
        <DCCReference Include="rtl.dcp"/>
        <DCCReference Include="vcl.dcp"/>
        <DCCReference Include="test_runtime_package_delphi.pas"/>
        <BuildConfiguration Include="Release">
            <Key>Cfg_2</Key>
            <CfgParent>Base</CfgParent>
        </BuildConfiguration>
        <BuildConfiguration Include="Base">
            <Key>Base</Key>
        </BuildConfiguration>
        <BuildConfiguration Include="Debug">
            <Key>Cfg_1</Key>
            <CfgParent>Base</CfgParent>
        </BuildConfiguration>
    </ItemGroup>
    <ProjectExtensions>
        <Borland.Personality>Delphi.Personality.12</Borland.Personality>
        <Borland.ProjectType>Package</Borland.ProjectType>
        <BorlandProject>
            <Delphi.Personality>
                <Source>
                    <Source Name="MainSource">test_runtime_package.dpk</Source>
                </Source>
                <VersionInfo>
                    <VersionInfo Name="IncludeVerInfo">True</VersionInfo>
                    <VersionInfo Name="AutoIncBuild">False</VersionInfo>
                    <VersionInfo Name="MajorVer">1</VersionInfo>
                    <VersionInfo Name="MinorVer">0</VersionInfo>
                    <VersionInfo Name="Release">0</VersionInfo>
                    <VersionInfo Name="Build">0</VersionInfo>
                    <VersionInfo Name="Debug">False</VersionInfo>
                    <VersionInfo Name="PreRelease">False</VersionInfo>
                    <VersionInfo Name="Special">False</VersionInfo>
                    <VersionInfo Name="Private">False</VersionInfo>
                    <VersionInfo Name="DLL">False</VersionInfo>
                    <VersionInfo Name="Locale">1049</VersionInfo>
                    <VersionInfo Name="CodePage">1251</VersionInfo>
                </VersionInfo>
                <VersionInfoKeys>
                    <VersionInfoKeys Name="CompanyName"/>
                    <VersionInfoKeys Name="FileDescription"/>
                    <VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
                    <VersionInfoKeys Name="InternalName"/>
                    <VersionInfoKeys Name="LegalCopyright"/>
                    <VersionInfoKeys Name="LegalTrademarks"/>
                    <VersionInfoKeys Name="OriginalFilename"/>
                    <VersionInfoKeys Name="ProductName"/>
                    <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
                    <VersionInfoKeys Name="Comments"/>
                    <VersionInfoKeys Name="CFBundleName"/>
                    <VersionInfoKeys Name="CFBundleDisplayName"/>
                    <VersionInfoKeys Name="UIDeviceFamily"/>
                    <VersionInfoKeys Name="CFBundleIdentifier"/>
                    <VersionInfoKeys Name="CFBundleVersion"/>
                    <VersionInfoKeys Name="CFBundlePackageType"/>
                    <VersionInfoKeys Name="CFBundleSignature"/>
                    <VersionInfoKeys Name="CFBundleAllowMixedLocalizations"/>
                    <VersionInfoKeys Name="UISupportedInterfaceOrientations"/>
                    <VersionInfoKeys Name="CFBundleExecutable"/>
                    <VersionInfoKeys Name="CFBundleResourceSpecification"/>
                    <VersionInfoKeys Name="LSRequiresIPhoneOS"/>
                    <VersionInfoKeys Name="CFBundleInfoDictionaryVersion"/>
                    <VersionInfoKeys Name="CFBundleDevelopmentRegion"/>
                    <VersionInfoKeys Name="package"/>
                    <VersionInfoKeys Name="label"/>
                    <VersionInfoKeys Name="versionCode"/>
                    <VersionInfoKeys Name="versionName"/>
                    <VersionInfoKeys Name="persistent"/>
                    <VersionInfoKeys Name="restoreAnyVersion"/>
                    <VersionInfoKeys Name="installLocation"/>
                    <VersionInfoKeys Name="largeHeap"/>
                    <VersionInfoKeys Name="theme"/>
                </VersionInfoKeys>
                <Excluded_Packages>
                    <Excluded_Packages Name="$(BDSBIN)\bcboffice2k190.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
                    <Excluded_Packages Name="$(BDSBIN)\bcbofficexp190.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
                    <Excluded_Packages Name="$(BDSBIN)\dcloffice2k190.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
                    <Excluded_Packages Name="$(BDSBIN)\dclofficexp190.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
                </Excluded_Packages>
            </Delphi.Personality>
            <Deployment/>
            <Platforms>
                <Platform value="Win32">True</Platform>
                <Platform value="Win64">False</Platform>
            </Platforms>
        </BorlandProject>
        <ProjectFileVersion>12</ProjectFileVersion>
    </ProjectExtensions>
    <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
    <Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
</Project>

test_runtime_package_delphi.pas

unit test_runtime_package_delphi;

interface

uses Vcl.Dialogs;

type
   TStringTest = Class

     private

     published
       constructor Create(Text : String);
   end;

implementation

constructor TStringTest.Create(Text: String);
var
str: String;
 begin
   ShowMessage(Text);
   str         := Text;
 end;


end.

Project test_runtime_package.cbproj, include files:

  • test_runtime_package.cpp
  • test_runtime_package_delphi.pas

test_runtime_package.cbproj

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
        <ProjectGuid>{C6C68C4D-7E20-441B-A166-E18E74DCF4E3}</ProjectGuid>
        <ProjectVersion>15.3</ProjectVersion>
        <FrameworkType>None</FrameworkType>
        <MainSource>test_runtime_package.cpp</MainSource>
        <Base>True</Base>
        <Config Condition="'$(Config)'==''">Debug</Config>
        <Platform Condition="'$(Platform)'==''">Win32</Platform>
        <TargetedPlatforms>1</TargetedPlatforms>
        <AppType>Package</AppType>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
        <Base>true</Base>
    </PropertyGroup>
    <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
        <Base_Win32>true</Base_Win32>
        <CfgParent>Base</CfgParent>
        <Base>true</Base>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
        <Cfg_1>true</Cfg_1>
        <CfgParent>Base</CfgParent>
        <Base>true</Base>
    </PropertyGroup>
    <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
        <Cfg_1_Win32>true</Cfg_1_Win32>
        <CfgParent>Cfg_1</CfgParent>
        <Cfg_1>true</Cfg_1>
        <Base>true</Base>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
        <Cfg_2>true</Cfg_2>
        <CfgParent>Base</CfgParent>
        <Base>true</Base>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Base)'!=''">
        <RuntimeOnlyPackage>true</RuntimeOnlyPackage>
        <ILINK_GenerateLibFile>true</ILINK_GenerateLibFile>
        <_TCHARMapping>char</_TCHARMapping>
        <DCC_OutputNeverBuildDcps>true</DCC_OutputNeverBuildDcps>
        <ILINK_GenerateImportLibrary>true</ILINK_GenerateImportLibrary>
        <Multithreaded>true</Multithreaded>
        <DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
        <ProjectType>CppPackage</ProjectType>
        <DCC_CBuilderOutput>JPHNE</DCC_CBuilderOutput>
        <DynamicRTL>true</DynamicRTL>
        <UsePackages>true</UsePackages>
        <IntermediateOutputDir>.\$(Platform)\$(Config)</IntermediateOutputDir>
        <BCC_wpar>false</BCC_wpar>
        <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
        <BCC_ExtendedErrorInfo>true</BCC_ExtendedErrorInfo>
        <ILINK_TranslatedLibraryPath>$(BDSLIB)\$(PLATFORM)\release\$(LANGDIR);$(ILINK_TranslatedLibraryPath)</ILINK_TranslatedLibraryPath>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Base_Win32)'!=''">
        <PackageImports>adortl;bcbie;bcbsmp;bdertl;bindcomp;bindcompdbx;bindcompfmx;bindcompvcl;bindengine;CloudService;CodeSiteExpressPkg;CustomIPTransport;DataSnapClient;DataSnapCommon;DataSnapConnectors;DatasnapConnectorsFreePascal;DataSnapFireDAC;DataSnapIndy10ServerTransport;DataSnapProviderClient;DataSnapServer;dbexpress;dbrtl;dbxcds;DbxClientDriver;DbxCommonDriver;DBXDb2Driver;DBXFirebirdDriver;DBXInformixDriver;DBXInterBaseDriver;DBXMSSQLDriver;DBXMySQLDriver;DBXOdbcDriver;DBXOracleDriver;DBXSqliteDriver;DBXSybaseASADriver;DBXSybaseASEDriver;dsnap;dsnapcon;FireDAC;FireDACADSDriver;FireDACASADriver;FireDACCommon;FireDACCommonDriver;FireDACDataSnapDriver;FireDACDb2Driver;FireDACDBXDriver;FireDACIBDriver;FireDACMSAccDriver;FireDACMSSQLDriver;FireDACMySQLDriver;FireDACODBCDriver;FireDACOracleDriver;FireDACPgDriver;FireDACSqliteDriver;fmx;fmxase;fmxdae;fmxFireDAC;fmxobj;FMXTee;FmxTeeUI;frx19;frxDB19;frxe19;ibxpress;IndyCore;IndyIPClient;IndyIPCommon;IndyIPServer;IndyProtocols;IndySystem;inet;inetdb;inetdbbde;inetdbxpress;Intraweb;MetropolisUILiveTile;RESTComponents;rtl;soaprtl;svn;Tee;TeeDB;TeeUI;vcl;vclactnband;vcldb;vcldbx;vcldsnap;vclFireDAC;vclib;vclie;vclimg;VCLRESTComponents;vclribbon;VclSmp;vcltouch;vclx;xmlrtl;$(PackageImports)</PackageImports>
        <VerInfo_Locale>1033</VerInfo_Locale>
        <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
        <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Cfg_1)'!=''">
        <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
        <BCC_DisableOptimizations>true</BCC_DisableOptimizations>
        <DCC_Optimize>false</DCC_Optimize>
        <DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
        <Defines>_DEBUG;$(Defines)</Defines>
        <BCC_InlineFunctionExpansion>false</BCC_InlineFunctionExpansion>
        <BCC_UseRegisterVariables>None</BCC_UseRegisterVariables>
        <DCC_Define>DEBUG</DCC_Define>
        <BCC_DebugLineNumbers>true</BCC_DebugLineNumbers>
        <TASM_DisplaySourceLines>true</TASM_DisplaySourceLines>
        <BCC_StackFrames>true</BCC_StackFrames>
        <ILINK_FullDebugInfo>true</ILINK_FullDebugInfo>
        <TASM_Debugging>Full</TASM_Debugging>
        <BCC_SourceDebuggingOn>true</BCC_SourceDebuggingOn>
        <BCC_EnableCPPExceptions>true</BCC_EnableCPPExceptions>
        <BCC_DisableFramePtrElimOpt>true</BCC_DisableFramePtrElimOpt>
        <BCC_DisableSpellChecking>true</BCC_DisableSpellChecking>
        <CLANG_UnwindTables>true</CLANG_UnwindTables>
        <ILINK_LibraryPath>$(BDSLIB)\$(PLATFORM)\debug;$(ILINK_LibraryPath)</ILINK_LibraryPath>
        <ILINK_TranslatedLibraryPath>$(BDSLIB)\$(PLATFORM)\debug\$(LANGDIR);$(ILINK_TranslatedLibraryPath)</ILINK_TranslatedLibraryPath>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
        <Debugger_HostApplication>C:\Program Files (x86)\Embarcadero\RAD Studio\12.0\bin\bds.exe</Debugger_HostApplication>
        <BPILibOutputDir>.\</BPILibOutputDir>
        <ILINK_Description>test_runtime_package</ILINK_Description>
        <VerInfo_Locale>1033</VerInfo_Locale>
        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Cfg_2)'!=''">
        <Defines>NDEBUG;$(Defines)</Defines>
        <TASM_Debugging>None</TASM_Debugging>
    </PropertyGroup>
    <ItemGroup>
        <PackageImport Include="rtl.bpi">
            <BuildOrder>1</BuildOrder>
        </PackageImport>
        <CppCompile Include="test_runtime_package.cpp">
            <BuildOrder>0</BuildOrder>
        </CppCompile>
        <DelphiCompile Include="test_runtime_package_delphi.pas">
            <BuildOrder>3</BuildOrder>
        </DelphiCompile>
        <PackageImport Include="vcl.bpi">
            <BuildOrder>4</BuildOrder>
        </PackageImport>
        <BuildConfiguration Include="Release">
            <Key>Cfg_2</Key>
            <CfgParent>Base</CfgParent>
        </BuildConfiguration>
        <BuildConfiguration Include="Base">
            <Key>Base</Key>
        </BuildConfiguration>
        <BuildConfiguration Include="Debug">
            <Key>Cfg_1</Key>
            <CfgParent>Base</CfgParent>
        </BuildConfiguration>
    </ItemGroup>
    <ProjectExtensions>
        <Borland.Personality>CPlusPlusBuilder.Personality.12</Borland.Personality>
        <Borland.ProjectType>CppPackage</Borland.ProjectType>
        <BorlandProject>
            <CPlusPlusBuilder.Personality>
                <Source>
                    <Source Name="MainSource">test_runtime_package.cpp</Source>
                </Source>
                <VersionInfo>
                    <VersionInfo Name="IncludeVerInfo">False</VersionInfo>
                    <VersionInfo Name="AutoIncBuild">False</VersionInfo>
                    <VersionInfo Name="MajorVer">1</VersionInfo>
                    <VersionInfo Name="MinorVer">0</VersionInfo>
                    <VersionInfo Name="Release">0</VersionInfo>
                    <VersionInfo Name="Build">0</VersionInfo>
                    <VersionInfo Name="Debug">False</VersionInfo>
                    <VersionInfo Name="PreRelease">False</VersionInfo>
                    <VersionInfo Name="Special">False</VersionInfo>
                    <VersionInfo Name="Private">False</VersionInfo>
                    <VersionInfo Name="DLL">False</VersionInfo>
                    <VersionInfo Name="Locale">1049</VersionInfo>
                    <VersionInfo Name="CodePage">1251</VersionInfo>
                </VersionInfo>
                <VersionInfoKeys>
                    <VersionInfoKeys Name="CompanyName"/>
                    <VersionInfoKeys Name="FileDescription"/>
                    <VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
                    <VersionInfoKeys Name="InternalName"/>
                    <VersionInfoKeys Name="LegalCopyright"/>
                    <VersionInfoKeys Name="LegalTrademarks"/>
                    <VersionInfoKeys Name="OriginalFilename"/>
                    <VersionInfoKeys Name="ProductName"/>
                    <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
                    <VersionInfoKeys Name="Comments"/>
                    <VersionInfoKeys Name="CFBundleName"/>
                    <VersionInfoKeys Name="CFBundleDisplayName"/>
                    <VersionInfoKeys Name="UIDeviceFamily"/>
                    <VersionInfoKeys Name="CFBundleIdentifier"/>
                    <VersionInfoKeys Name="CFBundleVersion"/>
                    <VersionInfoKeys Name="CFBundlePackageType"/>
                    <VersionInfoKeys Name="CFBundleSignature"/>
                    <VersionInfoKeys Name="CFBundleAllowMixedLocalizations"/>
                    <VersionInfoKeys Name="UISupportedInterfaceOrientations"/>
                    <VersionInfoKeys Name="CFBundleExecutable"/>
                    <VersionInfoKeys Name="CFBundleResourceSpecification"/>
                    <VersionInfoKeys Name="LSRequiresIPhoneOS"/>
                    <VersionInfoKeys Name="CFBundleInfoDictionaryVersion"/>
                    <VersionInfoKeys Name="CFBundleDevelopmentRegion"/>
                    <VersionInfoKeys Name="package"/>
                    <VersionInfoKeys Name="label"/>
                    <VersionInfoKeys Name="versionCode"/>
                    <VersionInfoKeys Name="versionName"/>
                    <VersionInfoKeys Name="persistent"/>
                    <VersionInfoKeys Name="restoreAnyVersion"/>
                    <VersionInfoKeys Name="installLocation"/>
                    <VersionInfoKeys Name="largeHeap"/>
                    <VersionInfoKeys Name="theme"/>
                </VersionInfoKeys>
                <ProjectProperties>
                    <ProjectProperties Name="AutoShowDeps">False</ProjectProperties>
                    <ProjectProperties Name="ManagePaths">True</ProjectProperties>
                    <ProjectProperties Name="VerifyPackages">True</ProjectProperties>
                </ProjectProperties>
                <Excluded_Packages>
                    <Excluded_Packages Name="$(BDSBIN)\bcboffice2k190.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
                    <Excluded_Packages Name="$(BDSBIN)\bcbofficexp190.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
                    <Excluded_Packages Name="$(BDSBIN)\dcloffice2k190.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
                    <Excluded_Packages Name="$(BDSBIN)\dclofficexp190.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
                </Excluded_Packages>
            </CPlusPlusBuilder.Personality>
            <Deployment/>
            <Platforms>
                <Platform value="Win32">True</Platform>
            </Platforms>
        </BorlandProject>
        <ProjectFileVersion>12</ProjectFileVersion>
    </ProjectExtensions>
    <Import Project="$(BDS)\Bin\CodeGear.Cpp.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Cpp.Targets')"/>
    <Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
</Project>

test_runtime_package.cpp

#include <vcl.h>
#pragma hdrstop
#pragma package(smart_init)

int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*)
{
    return 1;
}

File test_runtime_package_delphi.pas the same as in the project test_runtime_package.dpk.

3
  • The method described by @dummzeuch in the linked answer works fine, and I have used it many times myself. A few times I have had the "main" IDE instance not stop on the breakpoints when the second instance loads the package being debugged. When that happens, it is usually fixed by the following: 1. Close both instances of the IDE. 2. Delete the .Bpl file of the package. 3. Restart the IDE. 4. Open the Bpl's .Dpk file as the IDE's project & recompile. 5. Set breakpoints then start 2nd IDE instance.
    – MartynA
    Commented Jul 20, 2020 at 16:04
  • 2
    PS, if you want more help, you will need to provide a minimal dt unit + .Dpk which replicates the problem you're having.
    – MartynA
    Commented Jul 20, 2020 at 16:07
  • @MartynA I update my question (UPD1)
    – Range
    Commented Jul 21, 2020 at 20:53

1 Answer 1

0

I have a simular problem. When having <DCC_CBuilderOutput>None</DCC_CBuilderOutput> (Which is "Generate DCUs only") Debugging works.

You can find DCC_CBuilderOutput setting in Delphi Studio in Building -> Delphi Compiler -> Output - C/C++

I could reproducibly "kill" the debugging information by changing this to any, such as J, JPH, etc.. You have All and JPHNE in your dprojs. I also get Warning "W1031 Package 'xyz' will not be written to disk because -J option is enabled"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.