C# (well, technically, MSBuild) has a system known as “build configurations”. Basically, you get a nice drop-down menu in Visual Studio (or Rider) that allows you to change how your code is compiled and ran.
In a default C# project, you have two configurations:
Debughas debug checks (e.g. asserts) enabled, and is compiled/ran without optimizations1.
Releasehas no debug checks and is compiled with optimizations.
In RobustToolbox, there are various development tools that cannot be included in live release builds. Examples of this are the
csi C# Interactive prompt, for security reasons. These tools are generally compiled in behind the
TOOLS preprocessor define, which is also how they are turned off.
Furthermore, during game development it might generally be useful to run optimizations more frequently than usual. Not getting a stable framerate on a debug build can make testing rather painful, but simply switching from
Release in the default C# model also gets rid of checks like asserts, which does change behavior and might cause you to miss issues.
Because of this, we have the following set of configurations in our solutions:
Debug: has debug checks, tools, and no optimizations.
DebugOpt: is like
Debug, but with optimizations enabled.
Tools: no debug checks, but tools and optimizations enabled. This is what you’d use when mapping.
Release: no debug checks, no tools, optimizations enabled. This is intended to be as close to a live launcher build as you can get.
Having optimizations enabled generally makes it harder for tools like debuggers to give accurate information, so that’s why they’re off on debug builds.
Select from that drop-down at the top of the window.
I’m too lazy to find a screenshot, but the drop-down looks kinda similar to Rider.