forked from keybase/client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
local-debug.desktop.tsx
98 lines (91 loc) · 3.08 KB
/
local-debug.desktop.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
import noop from 'lodash/noop'
import KB2 from './util/electron.desktop'
let config = {
// Set this to true if you want to turn off most console logging so you can profile easier
PERF: false,
allowMultipleInstances: false, // let more run
debugFullLogs: false, // only for getting full action logs in debug mode
featureFlagsOverride: '' as string | undefined, // Override feature flags
filterActionLogs: null, // Filter actions in log
forceImmediateLogging: false, // Don't wait for idle to log
ignoreDisconnectOverlay: false, // Let you use the app even in a disconnected state
immediateStateLogging: false, // Don't wait for idle to log state
isDevApplePushToken: false,
isTesting: false, // Is running a unit test
partyMode: false,
printOutstandingRPCs: false, // Periodically print rpcs we're waiting for
printOutstandingTimerListeners: false, // Periodically print listeners to the second clock
printRPC: false, // Print rpc traffic
printRPCBytes: false, // Print raw bytes going over the wire
printRPCStats: false, // Print more detailed stats about rpcs
printRPCWaitingSession: false, // session / waiting info
showDevTools: false,
skipAppFocusActions: false, // dont emit actions when going foreground/background, helpful while working on other actions stuff
skipExtensions: true, // if true dont load devtools extensions
skipSecondaryDevtools: true,
userTimings: false, // Add user timings api to timeline in chrome
}
// Developer settings
if (__DEV__) {
config.debugFullLogs = false
config.filterActionLogs = null // '^chat|entity'
config.printOutstandingRPCs = true
config.printOutstandingTimerListeners = true
config.printRPC = true
config.printRPCStats = true
config.printRPCWaitingSession = false
config.showDevTools = true
config.skipExtensions = false
config.skipSecondaryDevtools = true
config.userTimings = true
}
config = {
...config,
...KB2.constants.configOverload,
}
// If debugFullLogs
if (config.debugFullLogs) {
console.warn('\n\n\nlocal debug config.debugFullLogs is ONNNNNn!!!!!1!!!11!!!!\n')
config.printRPC = true
}
// If performance testing
if (config.PERF) {
console.warn('\n\n\nlocal debug config.PERF is ONNNNNn!!!!!1!!!11!!!!\nAll console.logs disabled!\n\n\n')
const c = console
c.log = noop
c.warn = noop
c.error = noop
c.info = noop
config.filterActionLogs = null
config.forceImmediateLogging = false
config.ignoreDisconnectOverlay = false
config.immediateStateLogging = false
config.printOutstandingRPCs = false
config.printOutstandingTimerListeners = false
config.printRPC = false
config.skipExtensions = true
config.userTimings = false
}
export const {
allowMultipleInstances,
debugFullLogs,
featureFlagsOverride,
filterActionLogs,
forceImmediateLogging,
ignoreDisconnectOverlay,
immediateStateLogging,
isDevApplePushToken,
isTesting,
partyMode,
printOutstandingRPCs,
printOutstandingTimerListeners,
printRPC,
printRPCBytes,
printRPCStats,
printRPCWaitingSession,
showDevTools,
skipAppFocusActions,
skipExtensions,
skipSecondaryDevtools,
userTimings,
} = config