MCPcopy Create free account
hub / github.com/jhen0409/react-native-debugger / setDebuggerLoc

Function setDebuggerLoc

app/middlewares/debuggerAPI.js:198–211  ·  view source on GitHub ↗
({ host: packagerHost, port: packagerPort })

Source from the content-addressed store, hash-verified

196}
197
198const setDebuggerLoc = ({ host: packagerHost, port: packagerPort }) => {
199 if (host === packagerHost && port === Number(packagerPort)) return
200
201 host = packagerHost || 'localhost'
202 port = packagerPort || config.port || 8081
203 if (socket) {
204 shutdownJSRuntime()
205 socket.close()
206 } else {
207 // Should ensure cleared timeout if called preconnect twice
208 clearTimeout(preconnectTimeout)
209 preconnect(connectToDebuggerProxy)
210 }
211}
212
213export default ({ dispatch }) => {
214 actions = bindActionCreators(debuggerActions, dispatch)

Callers 1

debuggerAPI.jsFile · 0.85

Calls 2

shutdownJSRuntimeFunction · 0.85
preconnectFunction · 0.85

Tested by

no test coverage detected