Angryfan1
Angryfan1

Reputation: 11

My program will not debug even if the code is correct

My program will not debug in visual studios the include is underlined in red when i try to debug this message comes up in the output box.

1>------ Build started: Project: abc, Configuration: Debug Win32 ------
1>Build started 10/10/2012 6:09:49 PM.
1>InitializeBuildStatus:
1>  Touching "Debug\abc.unsuccessfulbuild".
1>cl : Command line error D8016: '/ZI' and '/Ox' command-line options are incompatible

Upvotes: 1

Views: 825

Answers (1)

cHao
cHao

Reputation: 86525

It looks like you've told Visual Studio to optimize your debug build.

That's not going to work; optimization and debugging are rather incompatible with each other, and thus generally aren't allowed together. Optimization tends to rearrange things in ways that make it difficult-to-impossible to match up code addresses with source lines, which makes debugging info either impossible to generate or pretty useless even if it can be generated.

You'll want to either switch to a release build, or turn off the optimizations.

Upvotes: 3

Related Questions