mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Enable SK2 debug only with debugging config, not just debug build
This commit is contained in:
@@ -234,7 +234,7 @@ namespace ArchiSteamFarm {
|
||||
// Initialize
|
||||
SteamClient = new SteamClient(SteamConfiguration, botName);
|
||||
|
||||
if (Debugging.IsUserDebugging && Directory.Exists(SharedInfo.DebugDirectory)) {
|
||||
if (Debugging.IsDebugConfigured && Directory.Exists(SharedInfo.DebugDirectory)) {
|
||||
string debugListenerPath = Path.Combine(SharedInfo.DebugDirectory, botName);
|
||||
|
||||
try {
|
||||
|
||||
@@ -324,15 +324,17 @@ namespace ArchiSteamFarm {
|
||||
|
||||
Logging.EnableTraceLogging();
|
||||
|
||||
DebugLog.AddListener(new Debugging.DebugListener());
|
||||
DebugLog.Enabled = true;
|
||||
if (Debugging.IsDebugConfigured) {
|
||||
DebugLog.AddListener(new Debugging.DebugListener());
|
||||
DebugLog.Enabled = true;
|
||||
|
||||
if (Directory.Exists(SharedInfo.DebugDirectory)) {
|
||||
try {
|
||||
Directory.Delete(SharedInfo.DebugDirectory, true);
|
||||
await Task.Delay(1000).ConfigureAwait(false); // Dirty workaround giving Windows some time to sync
|
||||
} catch (Exception e) {
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
if (Directory.Exists(SharedInfo.DebugDirectory)) {
|
||||
try {
|
||||
Directory.Delete(SharedInfo.DebugDirectory, true);
|
||||
await Task.Delay(1000).ConfigureAwait(false); // Dirty workaround giving Windows some time to sync
|
||||
} catch (Exception e) {
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user