Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there Visual Studio 2015 Debugging step skipping?

I installed the new version of Visual Studio Community 2015.

Opened old Visual Studio 2010 projects. They compiled okay. Then when I needed to debug them I found out something strange.

When I try to Step Over(F10) just skips lines of code like they weren't there.enter image descrihgdfhption here

For example I start debugging in line 33, then F10 sends me right to line 43.

How is that?

And is it configurable.

like image 608
Zhivko Kabaivanov Avatar asked Jan 07 '23 05:01

Zhivko Kabaivanov


1 Answers

This behavior is consistent with debugging optimized code.

You can verify what code was generated by going to Tools -> ILDasm, loading your executable and inspecting that function. Or, while on a breakpoint in the Debugger, Debug -> Windows -> Disassembly (or click Alt+8).

This may be a new feature in 2015, as my 2013 does not optimize that assignment/test out...

like image 163
Vlad Feinstein Avatar answered Jan 16 '23 03:01

Vlad Feinstein