Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: mahaju on September 04, 2012, 08:01:28 am

Title: stepping out of loop in debug mode
Post by: mahaju on September 04, 2012, 08:01:28 am
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?


Code
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
Title: Re: stepping out of loop in debug mode
Post by: ollydbg on September 04, 2012, 09:00:24 am
Code
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.