无法连接远程调试器 [英] Unable to connect with remote debugger

查看:99
本文介绍了无法连接远程调试器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用React.JS,当我执行react-native run-android(插入设备)时,我会看到一个空白页.当我摇晃设备并从选项列表中选择Debug JS Remotely时,会看到以下屏幕.

I'm using React.JS and when I do react-native run-android (with my device plugged in) I see a blank page. When I shake the device and select Debug JS Remotely from the option list I see the following screen.

仅供参考:

OS: Ubuntu 16.04
Node version is: v4.6.2
java version "1.8.0_111"
react": "15.4.1
react-native": "0.38.0

推荐答案

在我的情况下,问题是仿真器正在向以下人员发出请求:

In my case the issue was that the emulator was making a request to:

http://10.0.2.2:8081/debugger-ui

代替:

http://localhost:8081/debugger-ui并且请求失败.

要解决此问题:在模拟器上启用远程调试之前,请在Chrome中打开http://localhost:8081/debugger-ui.然后启用远程调试,并返回到chrome页面,您应该在其中查看控制台日志.

To solve the issue: Before enabling remote debugging on your emulator, open http://localhost:8081/debugger-ui in chrome. Then enable remote debugging and go back to the chrome page where you should see your console logs.

这篇关于无法连接远程调试器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆