User forums > Using Code::Blocks

[solved] how to set a loop counter for debugging?

(1/1)

cbuser2:
Hi all.

If I have a loop, how can I set a counter to process the loop X times? I don't want to manually step through the loop X times. VC++ has an option for this, so does CB also have this option? It is a very convenient way to check the values of variables after a loop has done X times iterations.

EDIT: Basically what I want to do is to set a breakpoint in(or outside) a loop with the condition that the program breaks after X iterations of the loop.

Thanks in advance.

Martin K.:
edit breakpoint, Ignore count before break

Martin

cbuser2:

--- Quote from: Martin K. on November 20, 2012, 12:51:12 pm ---edit breakpoint, Ignore count before break

--- End quote ---

Thanks. :D

ollydbg:
See this image:

Also, you can see this manual about conditional breakpoint: http://www.delorie.com/gnu/docs/gdb/gdb_34.html

cbuser2:
Thanks ollydbg! :)

Navigation

[0] Message Index

Go to full version