Skip to main content
GameDev.net gamedev.net
🔒 Locked

MSVC 6.0 Debug Question

Started by BrianMJC Oct 9, 2003 at 8:37 PM 2 replies 350+ views
Original Post
BrianMJC
BrianMJC
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.
Sneftel
Sneftel
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.
wmurdick
wmurdick
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
"Iacta alea est" - Julius Caesar"So far as I know, I've never been defeated by a 'powerful over-arching potentiality' before"
BrianMJC
BrianMJC
Thanks guys. I''ll try ''em both.

Peace.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.