Opera Dragonfly远程调试:如何通过javascript连接?
现在我正在尝试为两个 Opera 实例设置远程调试。现在的问题是,我无法打开“opera:debug”窗口进行连接(这是不可能的,opera 嵌入在机顶盒中并且浏览器被禁用)。 我检查了“opera:debug”页面中的 javascript 调用。连接到远程调试器页面调用该函数
opera.connect(ip, port, callbackFnc).
到目前为止还不错,还是不行?虽然“opera:debug”页面可以调用此函数,但所有其他页面都不知道 opera 对象上的 connect 函数。它仅在“opera:debug”中可用。
到目前为止的代码(在机顶盒上运行的 javascript 中实现):
if ( opera ) {
opera.connect("192.168.1.4", "7001", function () { alert("worked"); });
}
所以我现在的问题是:如何仅使用 javascript 连接到远程调试器?为什么连接功能只能在“opera:debug”页面使用?
Right now i'm trying to setup remote debugging for two opera instances. The problem now is, that i can't open the "opera:debug" window to connect (it's just not possible, opera is embedded in a set-top-box and the browser is disabled).
I checked the "opera:debug" page for javascript calls. to connect to a remote debugger the page calls the function
opera.connect(ip, port, callbackFnc).
so far so good, or not? while the "opera:debug" page can call this function, all other pages don't know the connect function on the opera object. It's only available in "opera:debug".
code so far (implemented in javascript that runs on set-top-box):
if ( opera ) {
opera.connect("192.168.1.4", "7001", function () { alert("worked"); });
}
so my questions now: how can i connect to the remote debugger with javascript only? and how can it be, that the connect function is only available at the "opera:debug" page?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如您所猜测的,用于连接到调试器的 opera.connect() 方法仅在 opera:debug 页面上可用。如果打不开opera:debug,恐怕远程调试是不可能的。我想这个有限的机顶盒也不能让你添加用户JS? :-/
(如果你打开 opera:debug,你会得到一个错误页面吗?我想在错误页面上使用书签中的 opera.connect() 是行不通的,但你可以随时尝试..)
As you're guessing, the opera.connect() method for connecting to a debugger is only available on the opera:debug page. If you can't open opera:debug, remote debugging is not possible I'm afraid. I guess this limited set-top-box thingy doesn't let you add user JS either? :-/
(If you open opera:debug, do you get an error page? I guess using opera.connect() from a bookmarklet on the error page won't work but you can always try..)