You are better off following the VCL convention for third-party components:
- Change the output path of the DCU in all third-party packages to a folder other than the folder in which the PAS files are stored.
- Compile each package once in debug mode and save the generated DCU files in a folder (for example, Debug DCU).
- Compile each package again, but this time in Release mode and save the created DCU files in a folder (for example, Release DCU).
- Go to the Delphi options and add the DCU release path to the "library path".
- In the Delphi options, add the path to the source files in the "View Path".
- In the Delphi options, add the debug DCU path for "Debug DCU path".
Thus, when compiling your project, Delphi will only see the DCU releases of this third-party component, so the debugger cannot enter the source code. On the other hand, since the source path is included in the "View Path", you can still go to the source code inside the IDE using Ctrl + Click on the name of the element or everything that is defined in these units.
If you want to debug the component, you can go to "Project | Options | Delphi Compiler | Compiling" and turn on "Use debug.dcus". This will force the compiler to use the "Debug DCU path" instead of the "Library path".
VCL works the same way, as a rule, you do not enter the VCL source code when debugging your project, but if you enable "Use debug.dcus", you can also debug the VCL source code.
The JVCL also organizes its packages and source code in the same way.
EDIT : If you take this approach and want the work in the code view (Ctrl + Click) to work; note that when compiling package release versions, you must set the Symbol Reference Info in "Project | Options | Delphi Compiler | Compiling" to "Reference Info"; otherwise Ctrl + Click will not work for these devices. By default, the assembly configuration of the assembly sets the Symbol Reference value to None.
vcldeveloper
source share