News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

stepping out of loop in debug mode

Started by mahaju, September 04, 2012, 08:01:28 AM

Previous topic - Next topic

mahaju

Hi
I have a long loop inside a function call
If I want to just complete  the loop in one step but continue single stepping the other instructions inside the function call, how do I do it in CodeBlocks?
Also, how to do the same thing for an inner loop in a nested loop?


Eg:

void fnc ( ...){

   for (....)
     {
            // how to complete this loop immediately but single step through the other instructions in fnc()
     }

   for (.....)
    {   
           .
           .
           .
           for( ..... )
            {
                // how to complete this loop immediately but single step through the other instructions in the outer loop
               }
           .
           .
           .
     }



Please help
Thank you

CodeBlocks: 10.05

ollydbg


void fnc ( ...){

   for (....)
     {
            // how to complete this loop immediately but single step through the other instructions in fnc()
     }

   for (.....)

When debugging, click on the line of second "for", and context menu-> Run to cursor.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.