Repository navigation
Expand file tree
/
Copy pathlocal-debug.desktop.tsx
More file actions
76 lines (69 loc) · 2.29 KB
/
Copy pathlocal-debug.desktop.tsx
File metadata and controls
76 lines (69 loc) · 2.29 KB
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
import noop from 'lodash/noop'
import KB2 from './util/electron.desktop'
import {debugWarning} from '@/util/debug-warning'
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
featureFlagsOverride: '' as string | undefined, // Override feature flags
forceImmediateLogging: false, // Don't wait for idle to log
ignoreDisconnectOverlay: false, // Let you use the app even in a disconnected state
isDevApplePushToken: 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,
}
// Developer settings
if (__DEV__) {
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 = {
...config,
...KB2.constants.configOverload,
}
// If performance testing
if (config.PERF) {
debugWarning('local debug config.PERF is ONNNNNn')
const c = console
c.log = noop
c.warn = noop
c.error = noop
c.info = noop
config.forceImmediateLogging = false
config.ignoreDisconnectOverlay = false
config.printOutstandingRPCs = false
config.printOutstandingTimerListeners = false
config.printRPC = false
config.skipExtensions = true
}
export const {
allowMultipleInstances,
featureFlagsOverride,
forceImmediateLogging,
ignoreDisconnectOverlay,
isDevApplePushToken,
printOutstandingRPCs,
printOutstandingTimerListeners,
printRPC,
printRPCBytes,
printRPCStats,
printRPCWaitingSession,
showDevTools,
skipAppFocusActions,
skipExtensions,
skipSecondaryDevtools,
} = config