Skip to content

Instantly share code, notes, and snippets.

@mactive
Created June 23, 2016 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mactive/47fd28ec51037026ae4364cdcf633cbb to your computer and use it in GitHub Desktop.
Save mactive/47fd28ec51037026ae4364cdcf633cbb to your computer and use it in GitHub Desktop.
debugger.html 文件中的一段js
// 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.');
}
};
// ........
}
@mactive
Copy link
Author

mactive commented Jun 23, 2016

这个文件就是 被渲染到 http://localhost:8081/debugger-ui

@mactive
Copy link
Author

mactive commented Jun 23, 2016

npm start

@mactive
Copy link
Author

mactive commented Jun 23, 2016

debuggerwebsocket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment