Skip to content
Snippets Groups Projects
Unverified Commit 0d26afb1 authored by Matthias Urhahn's avatar Matthias Urhahn Committed by GitHub
Browse files

Automatically enable coroutine debugging in DEBUG and test builds. (#1060)...

Automatically enable coroutine debugging in DEBUG and test builds. (#1060) (Spawned by EXPOSUREAPP-2267)

* Automatically enable coroutine debugging in DEBUG and test builds.
CWADebug should be used as abstraction for enabling additional non-production debug features and modes.
In the future we can use this abstraction to enable additional debugging options in productions builds.
Sometimes that's the only way to debug issues that can't be reproduced by developers.

* Fix LINTing

Co-authored-by: default avatarMatthias Urhahn <matthias.urhahn@sap.com>
Co-authored-by: default avatarJakob Möller <jakob.moeller@sap.com>
parent 145503db
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,7 @@ import de.rki.coronawarnapp.exception.reporting.ReportingConstants.ERROR_REPORT_
import de.rki.coronawarnapp.notification.NotificationHelper
import de.rki.coronawarnapp.storage.LocalData
import de.rki.coronawarnapp.transaction.RetrieveDiagnosisKeysTransaction
import de.rki.coronawarnapp.util.CWADebug
import de.rki.coronawarnapp.util.ConnectivityHelper
import de.rki.coronawarnapp.worker.BackgroundWorkHelper
import de.rki.coronawarnapp.worker.BackgroundWorkScheduler
......@@ -57,6 +58,8 @@ class CoronaWarnApplication : Application(), LifecycleObserver,
super.onCreate()
instance = this
if (CWADebug.isDebugBuildOrMode) System.setProperty("kotlinx.coroutines.debug", "on")
val configuration = Configuration.Builder()
.setMinimumLoggingLevel(android.util.Log.DEBUG)
.build()
......
package de.rki.coronawarnapp.util
import de.rki.coronawarnapp.BuildConfig
object CWADebug {
val isDebugBuildOrMode: Boolean
get() = BuildConfig.DEBUG || BuildConfig.BUILD_VARIANT == "deviceForTesters"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment