Currently, all versions of Open Rails we produce automatically are "Release" builds - that is, all optimisations are enabled and most debugging is disabled.
When you build with Visual Studio, the default is "Debug" builds - the opposite, limited optimisations are enabled and all debugging is enabled.
One of the things which is enabled only in "Debug" builds is the System.Diagnostics.Debug class, which is fairly similar to the System.Diagnostics.Trace class we use for logging, but it has a few extra methods which we use in selected places.
The most useful is "Debug.Assert", which validates a condition and will deliberately crash the application if the condition is not met. This is called "asserting" and is generally a good idea when validating data from another part of the application that should never be incorrect. (It is not suitable for validating content/user supplied data.)
The other useful one is "Debug.WriteLine", which will write to the log file, similar to "Trace.Trace..." methods.
Enabling the "Debug" methods in the Unstable Version could allow people to get greater reach in validating their changes, should they choose to use "Debug.Assert" and "Debug.WriteLine" in their code.
Page 1 of 1
Experiment: Debug compilation for Unstable Version
#2
Posted 10 October 2021 - 05:15 AM
Weter, on 10 October 2021 - 04:30 AM, said:
So, mister Ross, if I understood you right, the idea was to make TESTING version with extended debug capabilities and reduced optimization, wasn't it?
No. It's the Unstable Version that will gain the extended debug capabilities. The Testing Version will remain as it is and continue to be fully optimised.
#3
Posted 10 October 2021 - 12:43 PM
Weter, on 10 October 2021 - 04:30 AM, said:
So, mister Ross, if I understood you right, the idea was to make TESTING version with extended debug capabilities and reduced optimization, wasn't it?
Alt+F3 will take effect there? ;)
Alt+F3 will take effect there? ;)
The title was a mistake; the change is for the Unstable Version, as described in the message.
This has nothing to do with Alt-F3 (Debug Physics Form) or any other debug features in-game.
#4
Posted 10 October 2021 - 01:33 PM
Page 1 of 1