views:

100

answers:

1

I have a Delphi app that we're migrating to C++. One thing I often do while debugging my Delphi code is step into the VCL itself to understand exactly what's going on, to track some bugs. Is this possible in C++Builder?

Suppose I am in C++Builder and I call "ShowMessage". Can I step into that call in my debugging session and switch to Pascal on the fly?

+6  A: 

It is possible, but you must change two settings. You must turn off the Dynamic RTL in the linker settings. You must disable linking with runtime packages in the package settings.

David Dean - Embarcadero
Does the runtime package rule still exist in XE, with debug DCPs provided?
Mason Wheeler
@Mason, No. C++ requires the tds files as well as the DCPs. It is on my radar, so I will be pushing for it.
David Dean - Embarcadero
@Mason: In all versions of C++, you have to enable the Debug .DCUs and disable the Dynamic RTL and Runtime Packages. The debugger cannot step into the VCL source if it is contained in external libraries, it has to be compiled directly into the application being debugged.
Remy Lebeau - TeamB
Thank you so much! This makes a BIG difference. I assume this will also allow us to step into our own Pascal code from our C++ program?
C. Smith
@David, could you clarify, please? You said *no* to Mason's follow-up question, to say that the runtime-package rule does not still exist, but then the rest of your comment seems to indicate that the rule *does* still exist because merely having debug DCPs isn't sufficient for C++ Builder.
Rob Kennedy
@Rob Thanks for pointing out the fact that this is unclear. The "rule" is (and has always been) that you need both debug DCPs and TDS files for C++ to debug into BPLs. (dynamic runtime packages) With XE, you now get DCP files you need for many of the packages supplied by Embarcadero. We failed to deliver TDS files for the same packages. I intend to see that this is corrected. So that means, It is possible to debug into bpls you build yourself, but not the ones shipped with XE. (or earlier)
David Dean - Embarcadero