Zhivko Kabaivanov
Zhivko Kabaivanov

Reputation: 373

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.

Upvotes: 5

Views: 2400

Answers (3)

Kota Naveen
Kota Naveen

Reputation: 1

In Visual Studio 2017, this happened in release mode, change to debug. it will work fine

Upvotes: 0

midwesterner
midwesterner

Reputation: 51

In Visual Studio 2015, this has happened to me in Release mode. After changing to Debug mode, debugger stepped thru each line. Hope this helps.

Upvotes: 5

Vlad Feinstein
Vlad Feinstein

Reputation: 11321

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...

Upvotes: 5

Related Questions