Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change define symbol for debug, fix missing debug block #43

Closed

Conversation

gfodor
Copy link
Contributor

@gfodor gfodor commented Jun 3, 2017

This PR changes the DEBUG define, which is always on in the Unity editor, to be ILRUNTIME_DEBUG so it can be turned off. It also adds what looked to be missing #if blocks.

@liiir1985
Copy link
Collaborator

Can you please tell me, what's your intention of changing the Precompile Symbol to ILRUNTIME_DEBUG?

The debugging support is intended to be switched off for final release build, because enabling debugging would cause a major performance overhead, which will consume much more cpu time and using much more memory as well. And I want to keep this part transparent for developers so they automatically get desired performance for release build and additional debug support for debug build.

@gfodor
Copy link
Contributor Author

gfodor commented Jun 4, 2017

The motivation for the change is because Unity seems to have DEBUG defined in the editor with no way, as best I can tell, to turn it off. This means I can't perform in-editor profiling using Unity's profiler with debugging code disabled. Definitely open to other suggestions.

@liiir1985
Copy link
Collaborator

I'm still the opinion that the standard behaviour should be automatically enabling debuging in editor and disabling it in non-development build to keep it simple for most developers.

But I agree that there should be an option for disabling it, so maybe it's better to use #if DEBUG && !ILRUNTIME_DISABLE_DEBUGGING?

@liiir1985
Copy link
Collaborator

Added a macro DISABLE_ILRUNTIME_DEBUG to explicitly disable the debuging support.
So PR Closed

@liiir1985 liiir1985 closed this Feb 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants