开发者

make code atomic for debugger

开发者 https://www.devze.com 2023-01-10 05:41 出处:网络
is there any way to make code for studio debugger atomic? e.g. #magic(atomarize) :D for(int i=0;i<100;++i)

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 d开发者_高级运维oesn't show how it's executed (it executes internally) and at once goes to the other statement


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消