Created
June 23, 2016 01:19
-
-
Save mactive/47fd28ec51037026ae4364cdcf633cbb to your computer and use it in GitHub Desktop.
debugger.html 文件中的一段js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// file location | |
// node_module/react-native/local-cli/server/util/debugger.html | |
function connectToDebuggerProxy() { | |
var ws = new DebuggerWebSocket('ws://' + window.location.host + '/debugger-proxy'); | |
ws.onopen = function() { | |
if (sessionID) { | |
setStatus('Debugger session #' + sessionID + ' active.'); | |
ws.send(JSON.stringify({replyID: parseInt(sessionID, 10)})); | |
} else { | |
setStatus('Waiting, press <span class="shortcut">⌘R</span> in simulator to reload and connect.'); | |
} | |
}; | |
// ........ | |
} |
Author
mactive
commented
Jun 23, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment