michael nesterenko
michael nesterenko

Reputation: 14449

make code atomic for debugger

is there any way to make code for studio debugger atomic? e.g.

#magic(atomarize) :D
for(int i=0;i<100;++i)
{
  //actions
}

// other statements

so when debugger comes to the for statement, it doesn't show how it's executed (it executes internally) and at once goes to the other statement

Upvotes: 0

Views: 103

Answers (2)

Colin Pickard
Colin Pickard

Reputation: 46663

Don't forget in gui debuggers like Visual Studio you have a "run to cursor" option - so you can set your cursor after the loop and then run straight past it.

Upvotes: 1

Tim Robinson
Tim Robinson

Reputation: 54764

You could put the code in a separate method and apply a [DebuggerStepThrough] attribute to it.

Upvotes: 3

Related Questions