Should Debug lines be removed before deploying game?

I found number of threads regarding this question but they all seemed old and outdated.

With Unity 4.6 and higher, is it still necessary to remove the Debug lines (or use Debug.isDebugBuild) or will Unity automatically remove them when deploying game without “Development Build” checked?

My understanding is that Unity doesn’t actually remove the Debug lines, but rather just makes the Debug.Log function a stub. this is an important distinction, because it can mean that function calls you make when constructing the string you send to Debug.Log are still being executed. Building strings can eat up cache memory and trigger garbage collection. I would recommend wrapping them in an if (Debug.isDebugBuild) to keep from triggering unnecessary garbage collection, if performance is a concern.

All Debug.Log functions work in builds; nothing to do with development builds. (Unless you uncheck “use player log” in the settings, though apparently that doesn’t work for all platforms.)

–Eric

Thank you for your help. My main concern is using assets from the Asset Store that don’t have their “Debug.Log” wrapped in “if (Debug.isDebugBuild)”. Every time they’re updated to a newer version, I’d have to go in and re-wrap them. Probably it’s best to just contact each of the developers and have them wrap their Debug statements in “if (Debug.isDebugBuild)”.