I add a delphi unit to my C++ Builder 2007 (11.0.2902.10471) package project.
I enable all debug options on C++, Delphi, and Linker sections. I create
a VCL form application that uses my package. I am unable to step into the
delphi unit in the debugger from the VCL form application code. I have tried
with dynamic RTL and runtime packages on and off with the same result. With
runtime packages enabled, if I go to View-->Debug Windows-->Modules, the
package I created lists win\CommCtrls.pas, win\Commdlg.pas, win\Dlgs.pas,
and several other pascal units, but not the one I compiled. I guess the
listed units in the module view are from debug DCU's or something like that.
Why does my debug info for my unit not show up?
Sample projects available upon request.
Thank you,
Ben
I am just now experiencing a similar problem debugging FastReport4 delphi
code.
I am using BCB2007 and FastReport 4.
I want to be able to trace into the FastReport 4 code sometimes when
debugging reports.
I compiled the MDI Designer demo project that comes with FastReport and I
can
trace into the FastReport pascal source files.
I try to trace into the FastReport 4 code using my application but
I do not see any blue bullets that indicate that the FastReport4 Source
code can be traced into.
I added the FastReport 4 Source and LibD11 paths into the
BCB2007 IDE Tools/Options/Debugger Options/CodeGear Debuggers/Debug Symbols
Search path
but I do not get any blue bullets.
Has anyone been able to trace into FastReport 4 ( or any Dephi ) source
code with BCB2007
and if so, what is needed to do this?
Larry Griffiths
"Ben Brandt" <be...@flowcal.com> wrote in message
news:7c7034de3b0a8...@forums.borland.com...
Fix:
Add <DCC_DebugInfoInExe>true</DCC_DebugInfoInExe> everywhere there is a <ILINK_FullDebugInfo>true</ILINK_FullDebugInfo>
in the cbproj file. Always backup your cbproj files before editing them.
Make sure you use a UNICODE compliant editor such as notepad++ or Beyond
Compare.
Is there some way to set this option in the IDE?
--Ben Brandt
Hello Ben,
Larry.
"Ben Brandt" <be...@flowcal.com> wrote in message
news:7c7034de3b468...@forums.borland.com...
I just add the delphi source code to my .exe project and then I can debug
the delphi source.
I used to be able to add the delphi source code path to IDE options and
be able to debug the delphi code. I know it worked for BCB5
and I think it also worked with BCB2006. I am thinking something is
now broken in BCB2007 when debugging delphi code from a C++ project.
Larry Griffiths.
"Clayton Arends" <nospam_cla...@hotmail.com> wrote in message
news:47ac...@newsgroups.borland.com...
>I have found that debugging Delphi packages that exist in a different
>directory than the EXE is what doesn't work. I have created a trick which
>works on my computer (I have never tested it on anyone else's machine).
>
> Create a Delphi project in the same directory as the EXE. Add a simple
> procedure and call it from the EXE's code somewhere. Add the package to
> the application. By doing this all Delphi packages are suddenly debugable
> for me. I have only tested this when "Build with runtime packages" is
> turned on. So, I do not know if this trick works when the app is built
> standalone.
>
> Ben, since your debugging is already working I'd be curious if this trick
> helps Larry.
>
> HTH,
> Clayton
>I do something similar.
>
> I just add the delphi source code to my .exe project and then I can debug
> the delphi source.
That might work for whatever source you copy. The approach I suggested
allows you to edit all Delphi source w/o copying to the local directory.
Clayton
Larry
"Clayton Arends" <nospam_cla...@hotmail.com> wrote in message
news:47acb0e8$1...@newsgroups.borland.com...
> I answered my own question. The option
> <DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
> is not included when converting a project from Builder 2006 to 2007.
Please enter this into Quality Central.
--
David Dean (CodeGear)
Lead C++ QA Engineer
> Has anyone been able to trace into FastReport 4 ( or any Dephi ) source
> code with BCB2007
> and if so, what is needed to do this?
IIRC, there is a particular combination of dynamic RTL and build with
runtime packages that needs to be set. I'm sure I've posted it in the
past, but I don't have the time to look right now. It should be quick to
try out the combinations...
I will give it a try on Monday.
Larry Griffiths.
"David Dean [CodeGear]" <david....@spam.codegear.com> wrote in message
news:david.dean.no-FC6...@c-59-100-143-10.ade.connect.net.au...
I built the project with "Dynamic RTL" and "Build with Runtime Packages" but
i do not see any blue bullets in the pascal source code.
Larry Griffiths
I checked "Dynamice RTL: and
"David Dean [CodeGear]" <david....@spam.codegear.com> wrote in message
news:david.dean.no-FC6...@c-59-100-143-10.ade.connect.net.au...
I saw the message when I started my application but still no blue bullets in
the pascal source.
Larry Griffiths.
"Clayton Arends" <nospam_cla...@hotmail.com> wrote in message
news:47ac...@newsgroups.borland.com...
> I saw the message when I started my application but still no blue bullets
> in the pascal source.
Did you specify that all output files go to the project's output directory?
Edit the project options of the package and specify that the "Output" and
"DCP output" directories go to the same as the application (Debug, for
example). Do the same for the application project's "Intermediate" and
"Final" directories.
I will attach my project group to a new post in .attachments titled "For
Larry Griffiths, debugging Delphi" for you to compare.
Clayton
> I built the project with "Dynamic RTL" and "Build with Runtime Packages" but
> i do not see any blue bullets in the pascal source code.
I just dug into my old posts to check, both of these must be off in
order to debug into VCL code...
Larry Griffiths
"David Dean [CodeGear]" <david....@spam.codegear.com> wrote in message
news:david.dean.no-30C...@killface.local...
I will try it tommorrow.
I will also try adding the FastReport path to the Tools/Options/Environment
Options/Delphi Options/Library - Win32/Debug DCU path.
I had been putting the path in the Debugger Options section and did not know
there was another place to possibly place a debug path.
Larry Griffiths
"Clayton Arends" <nospam_cla...@hotmail.com> wrote in message
news:47b08137$1...@newsgroups.borland.com...
I tried changing the Fastreport output directory to the same as my
application but still no bullets.
Larry Griffiths
"Clayton Arends" <nospam_cla...@hotmail.com> wrote in message
news:47b08137$1...@newsgroups.borland.com...
> The attachment appears to be missing header files.
Yes, it looks like when I was unchecking HPP files I accidentally unchecked
Unit1.h. I will reattach. It's just a standard header file though, here is
the content:
#ifndef Unit1H
#define Unit1H
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
class TForm1 : public TForm
{
__published: // IDE-managed Components
private: // User declarations
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
extern PACKAGE TForm1 *Form1;
#endif
Clayton
> I tried changing the Fastreport output directory to the same as my
> application but still no bullets.
Did you also change the "DCP output directory"? Also, to be sure of no IDE
confusion did you delete the existing FastReport output files (.bpi, .dcp,
.lib, .bpl, .tds) before attempting to debug with those files in their new
home?
On my end I changed my package to come from a different directory and
specified that the Output and DCP output directories go to the same location
as before (the same as the application). This debug test still succeeded.
So there is either something special about my system that makes this work,
something special about your system that makes this fail, or a project
configuration problem.
Since I don't own FastReport I cannot configure it on my end for purposes of
comparing configurations. What happens if you make a Delphi application and
attempt to debug FastReport? Does that work?
Clayton
The Package that comes with Fastreport does not have "Include TD32 debug
Info" checked so Builder does not get the debugging information.
The project options also have Linker Output set to "Generate DCUs" which
does not create the .bpi and .lib files builder needs
so I have to change it to "Generate all C++ Builder Files".
I also have to have "Dynamic RTL' and "Build with runtime packages"
UNCHECKED as David Dean wrote earlier in this thread.
Larry. Griffiths.
"Clayton Arends" <nospam_cla...@hotmail.com> wrote in message
news:47b3170b$1...@newsgroups.borland.com...
> I built the project with "Dynamic RTL" and "Build with Runtime Packages"
> UNCHECKED.
> I do not get the blue bullets when I try to debug the pascal source.
I'll dig into it, I should have some usable test cases lying around...
I will post the solution here also.
The Package that comes with Fastreport does not have "Include TD32 debug
Info" checked so Builder does not get the debugging information.
The project options also have Linker Output set to "Generate DCUs" which
does not create the .bpi and .lib files builder needs
so I have to change it to "Generate all C++ Builder Files".
I also have to have "Dynamic RTL' and "Build with runtime packages"
UNCHECKED .
Larry. Griffiths.
"David Dean [CodeGear]" <david....@spam.codegear.com> wrote in message
news:david.dean.no-28E...@killface.local...
> I also have to have "Dynamic RTL' and "Build with runtime packages"
> UNCHECKED .
If you can get the project demonstration that I was showing you to work then
you will be able to debug with those options checked on. Like I mentioned
before, you just need one *local* debug Delphi package working and RAD
starts to allow you to debug *all* Delphi packages (as long as their debug
information is turned on and the .tds is accessible via the debug search
path).
Clayton
"Clayton Arends" <nospam_cla...@hotmail.com> wrote in message
news:47b45020$1...@newsgroups.borland.com...
> What .tds are you talking about? Delphi does not produce .tds files does
> it?
It was a brain fart. I thought the same thing after I posted it.
Clayton
All that seems to be required is;
the .hpp header and a call to the delphi unit placed in a .exe unit.
the .bpi or .dcu added to the .exe project.
the .bpl must be in the same directory as the output of the .exe
project.
Larry Griffiths.
"Clayton Arends" <nospam_cla...@hotmail.com> wrote in message
news:47b45020$1...@newsgroups.borland.com...
Debugging works just fine with Dynamic RTL and Use Runtime Packages checked.
Thanks again for the tip, Clayton.
Larry.
"Larry Griffiths" <nos...@nowhere.com> wrote in message
news:47b60657$1...@newsgroups.borland.com...
>I did get it to work, Clayton.
That's great.
> All that seems to be required is;
> the .hpp header and a call to the delphi unit placed in a .exe unit.
> the .bpi or .dcu added to the .exe project.
> the .bpl must be in the same directory as the output of the .exe
> project.
And the project .dcp (I believe that's what you meant in the followup to
your post instead of .dcu of the project).
I named my package LclDebugPackage. What I do on my side is to compile this
package once to its own directory like C:\Source\Comps\LclDebugPackage.
Then, each time I need a C++ application to be able to debug the other
Delphi packages I copy the necessary files to the application's output
directory.
Thanks for sticking with this through my missing information. Now, if
CodeGear could just fix the debugger ... :)
Clayton