()
| 115 | |
| 116 | let loadCount = 0 |
| 117 | const checkJSLoadCount = () => { |
| 118 | loadCount += 1 |
| 119 | if ( |
| 120 | currentWindow.webContents.isDevToolsOpened() |
| 121 | && config.timesJSLoadToRefreshDevTools >= 0 |
| 122 | && loadCount > 0 |
| 123 | && loadCount % config.timesJSLoadToRefreshDevTools === 0 |
| 124 | ) { |
| 125 | currentWindow.webContents.closeDevTools() |
| 126 | currentWindow.webContents.openDevTools() |
| 127 | console.warn( |
| 128 | '[RNDebugger]', |
| 129 | `Refreshed the devtools panel as React Native app was reloaded ${loadCount} times.`, |
| 130 | 'If you want to update or disable this,', |
| 131 | 'Open `Debugger` -> `Open Config File` to change `timesJSLoadToRefreshDevTools` field.', |
| 132 | ) |
| 133 | loadCount = 0 |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | const connectToDebuggerProxy = async () => { |
| 138 | const ws = new WebSocket(`ws://${host}:${port}/debugger-proxy?role=debugger&name=Chrome`) |
no outgoing calls
no test coverage detected