Solved

BCB5 Debugger not working

Posted on 2004-09-01
6
952 Views
Last Modified: 2013-11-17
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
0
Comment
Question by:bohiggy
  • 2
6 Comments
 
LVL 16

Expert Comment

by:George Tokas
ID: 11954818
Did you specify the host application at Run|Parameters|Local|Host Application field??

gtokas.
0
 
LVL 16

Expert Comment

by:George Tokas
ID: 11954857
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.
0
 

Author Comment

by:bohiggy
ID: 11955423
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
0
 
LVL 1

Accepted Solution

by:
sophtware earned 500 total points
ID: 11972020
Here's a simple solution...

Find the .tds file (contains the debug info) for your DLL and copy it to your application directory. That is, where you are running it from. Once Builder can find it, debugging for the DLL is enabled. If you're loading the library dynamically, your breakpoints are "green" until LoadLibrary is called.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to edit a midi track 9 162
How to install eclipse SCADA on Linux Debian? 4 144
easiest way to find port number 12 104
eclipse ide not starting 16 79
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now