Reputation: 127
I'm using Visual Studio 2012 Express for Desktop and I have a code based on Winsock client-server. The problem comes when running the program. One functionality of the program works ONLY when debugging. Why could it happen? Any help is appreciated.
Upvotes: 0
Views: 1438
Reputation: 35440
For Visual Studio, if you compiled using the usual debugging defaults, there are things that are done at runtime that are not done in release mode.
One is that variables are initialized to 0 (or their default), while release mode they are left uninitialized. So it could be that uninitialized variable(s) are being used, and you don't see the issue when running the debug version.
Your best bet is to debug the release version. Then you can use the integrated debugger in the release build of your application.
Upvotes: 3