Archived

This topic is now archived and is closed to further replies.

BrianMJC

MSVC 6.0 Debug Question

Recommended Posts

BrianMJC    152
Hi all - I was wondering if anyone knows how, in the MSVC debugger, to set which iteration to run through during any loop (for, while, do-while). For example, lets say I get a page fault at iteration 4991 of 5000 in a for loop. If I want to see the variable values and regs during iteration 4990, how would you tell the debugger to run 4990 iterations? Thanks very much.

Share this post


Link to post
Share on other sites
Sneftel    1788
a conditional breakpoint may be used.... I forget the exact procedure, and I''m not running under windows right now, but check out the help files for information about ''em.


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites
wmurdick    140
This is a hack, but you could always add two lines like

if (x==4990)
cout << "here";

Then add your breakpoint. Its not an elegant solution, but it works and I have used it many times.

- Jason

Share this post


Link to post
Share on other sites