Link to home
Start Free TrialLog in
Avatar of bohiggy
bohiggy

asked on

BCB5 Debugger not working

Hi Experts...
I'm going nuts trying to set a usable breakpoint that will allow me to 'step into' the code of a C++Builder DLL used by another app.  This is not a 'remote debug' situtation ...we're talking all-local on a single machine.

Here's what happens:
1) Open 'DLL' Project using Borland C++ Builder 5 ... click Full Debug button on Project | Options  | Compiler tab
2) Verify that Project | Options | Linker tab has 'Create Debug Info' checked
3) Verify that Run | Parameters is set for the *.exe that will be using the DLL built by this project
4) Set breakpoint in BCB DLL code -- shows as healthy red dot in left gutter with red bar across desired line of code; note: its a legitimate breakpoint location, i.e. *not* on whitespace, comment line, etc
5) Clear out *.obj files (just in case)...click Project | Build All Projects .. no problem
6) Click Run icon (F9)
7) Aaarrrgh! Immediately after clicking Run, my healthy red breakpoint line croaks -- red dot gets a little white 'X' in it, and red bar highlight on that line of code turns to olive green!  I understand from docs that this indicates bad news, i.e. 'dead code' or 'invalid breakpoint.'  In fact, all breakpoints (whether set before or after clicking Run) will show as 'dead olive green'.
8) Desired app starts up and uses the BCB project DLL just fine, but code execution is not stopped at breakpoint location(s).

Note: I created a simple 'one form' BCB project (not the DLL scenario) new on my machine today and breakpoints worked fine.  I've fooled around a bit with Project | Options | Directories/Conditionals, but no directory shuffling  seemed to help.  Can someone tell me how to make breakpoints 'stay alive' and stop code execution properly in my C++ Builder 5 DLL?

Regards,

BH
Avatar of George Tokas
George Tokas
Flag of Greece image

Did you specify the host application at Run|Parameters|Local|Host Application field??

gtokas.
As you write in your post you did but it is needed the full path..
Did you set it using the Browse button??

As at least help and books write this is the way it works.

gtokas.
Avatar of bohiggy
bohiggy

ASKER

Yes, that is what I meant in step 3 of my description (I will edit question to clarify that detail)  ...I have set the full path of the 'Host Application' and the Host application fires off nicely when I click Run.

BH
ASKER CERTIFIED SOLUTION
Avatar of sophtware
sophtware

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial