nikolas
nikolas

Reputation: 8975

Differences between MSVC++ Debug and Release environment

I am dealing with a very peculiar problem at the moment: I have an application that is fully working in Debug-Buildmode, whether I run it from the MSVC environment or start the built executable myself. If I build this application in Release-Buildmode, it is fully working when I run it from the MSVC environment, but shows unexpected behavior when I start it myself.

What differences between the Debug and Release mode could be the reason for this behavior, and why do the problems only occur when I start the executable manually?

It's hard to give code, since it is quite a big project and I have absolutely no clue what could be causing the problem. The program flow is basically:

Something that I could imagine might cause problems, but I am not sure of:

Could this be the reason for my problems, and if yes, how do I solve the issue? I would really appreciate some help on this. Thanks in advance.

Update:

Update 2:

This seems to be a nice accomplishment, yet I lack the understanding for this problem.

Upvotes: 0

Views: 316

Answers (2)

Rohit Vipin Mathews
Rohit Vipin Mathews

Reputation: 11787

debug do not use optimizations there are optimizations in release mode that is why the exe size is different. Also the libraries used are different even though out of the same codes. you can make release like debug by turning off the optimization options.

Upvotes: 1

marcinj
marcinj

Reputation: 50036

Add logging, or eliminate some code blocks. This should allow to find where problem arises. For differences look here:

What is the difference between Debug and Release in Visual Studio?

Upvotes: 1

Related Questions