Debug vs Release Mode Build differences - Visual Studio .NET

distributed_99

New member
Joined
Jul 13, 2009
Messages
3
Programming Experience
1-3
Hello, and thanks in advance for any responses!

So here's the deal: I'm working on code that's been under development for quite some time already, and am trying to figure out why the code is generating different results for when it is built under debug mode versus when it is built under release mode.

As far as I'm aware, working code is working code....so the only thing I can think to look into is what Visual Studio itself is doing differently when in each of those modes. The same code...but different results based off of the build mode..... (my mind = ?!)

I've gone through the project properties to make sure that the properties are the same for both modes.

Any pointers in the right direction please?

Oh, also, something to note: I am working with the 2003 version...don't ask why, that's just what's being used.
 
Strictly speaking, Debug and Release are just build configurations. There's nothing inherently special about either of them. They are configured differently by default, e.g. the DEBUG constant is defined for the Debug build and optimisations are turned on for Release, but you could reverse all the differences if you wanted to.
 
They output to different folders, by default Debug or Release folder, so if you have runtime debug data in files in the Debug folder that would probably not be the same as in Release folder.
 
jmcilhinney,

I looked at the .vcproj that contains the XML code for the debug and release configurations to see the differences.

I tried directly editing the file but Visual Studio got really angry with me and I had to trash the code and use a backup copy. (Won't be doin that again....)

So now, in an attempt to get the settings to be absolutely identical, I'm googling each one of the variables in the configurations to see how you get to it via the Visual Studio interface. Is there an easy way to make all the project configuration variables identical? ...or do I need to continue googling which buttons I'm supposed to click in VS?

BETTER question, is it even POSSIBLE to make the settings identical?

Also, the optimizations.... debug was optimized for size, and release was optimized for speed. I tried changing the release mode to be optimized for size, and i still got different data results for when i ran the program in debug vs release. The version that is producing the correct output is the debug build, so I'm aiming to make the release mode match the debug and not vice versa.

I also tried making the LinkIncremental the same...still getting diff results.

Any other troubleshooting ideas?

BTW, i attached the relevant piece of the project config file if you wanted to take a look

johnH,

The runtime debug data is fine, I dont care if that exists in one folder and doesn't in another. The "data output" I'm talking about are the output files I've coded to be generated during program execution. For some reason, the numbers inside of the actual output files are different when the program is run in debug vs release mode.

Something I noticed....the difference is small....so it has to do with decimal precision being lost or added somewhere....

Example: Debug yields 0.271651 -------- Release yields 0.271650

does this give any more ideas?
 

Attachments

  • config_piece.txt
    2.4 KB · Views: 22
I'm aware of that, it's just that the project that I am working on has many languages joined under one roof, so I posted my problem in several places. I dont know/care who or where the solution will come from
 
Back
Top