Watch, Follow, &
Connect with Us
Public Report
Report From: C++BuilderX/Debugger    [ Add a report in this area ]  
Report #:  7526   Status: Reported
Borland Debugger stops stepping on breakpoint with condition
Project:  C++BuilderX/BC++ 2005 Build #:
Version:    1.0 Submitted By:   Brian Lloyd
Report Type:  Basic functionality failure Date Reported:  3/5/2004 8:11:58 AM
Severity:    Commonly encountered problem Last Updated:
Platform:    All versions Internal Tracking #:  
Resolution: None  Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (1 Total Rating)
5.00 out of 5
Total Votes: 4
I have not yet tried this on another platform, so it may occur on other platforms.

While stepping through code, the step routine starts running the program when you step onto a line that has a conditional value set.  This is most noticable when debugging in a loop.  After running to the point of interest, the code can be stepped through.  Another pass through the loop can require that the code steps through the line that originally stopped the code.

Debugging in loops is seriously impacted.
Steps to Reproduce:
compile the following code in debug mode using the
Borland tool set.

#include <iostream>

using namespace std;

int main(void)
int x=0;
int y=0;
for ( ; x < 1000; x++)
y = x % 100;
cout << "X=" << x << " Y=" << y;
return 0;

Place a breakpoint on the cout line.
Add a condition of y==0 to the breakpoint.
Execute the code in debug mode.
When the code stops on the breakpoint,
single step through the code.  
Notice that when you reach the breakpoint, the
execution resumes for another 100 rounds and then
stops again.  The step function can not step
through the breakpoint.
Remove the breakpoint, or at least the condition.

The breakpoint may need to be removed and readded
multiple times in a debug session.


Server Response from: ETNACODE01