Closed
Bug 1257477
Opened 8 years ago
Closed 8 years ago
No longer possible to remote debug Firefox -app (aka xulrunner app) since 44
Categories
(DevTools :: General, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1244163
People
(Reporter: duanyao.ustc, Unassigned)
Details
Attachments
(1 file)
17.82 KB,
application/zip
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Build ID: 20160303134406
Steps to reproduce:
Try to start debug server in "Firefox -app" mode with Firefox 44 like this:
const portOrPath = 6101;
const Cu = Components.utils;
try {
let { DevToolsLoader } =
Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
//Cu.import("resource://devtools/shared/Loader.jsm", {});
let serverLoader = new DevToolsLoader();
serverLoader.invisibleToDebugger = true;
serverLoader.main("devtools/server/main");
let debuggerServer = serverLoader.DebuggerServer;
debuggerServer.init();
debuggerServer.addBrowserActors();
debuggerServer.allowChromeProcess = true;
let listener = debuggerServer.createListener();
listener.portOrPath = portOrPath;
listener.open();
dump(">>>>>Started debugger server on " + portOrPath + "\n");
} catch (e) {
dump(">>>>>Unable to start debugger server on " + portOrPath + ": " + e + "\n");
}
You can use the attachment to reproduce: firefox -app remoteDebug44/application.ini -console
Actual results:
Error raised at this line: `Cu.import("resource://gre/modules/devtools/Loader.jsm", {})`:
>>>>>Unable to start debugger server on 6101: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXPCComponents_Utils.import]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: resource://gre/modules/devtools/Loader.jsm :: <TOP_LEVEL> :: line 35" data: no]
Expected results:
Debugger server should start successfully.
This works with Firefox 39-43 but not 44+.
I digged this issue a bit, and found that since Firefox 44, some devtools files required to start the debugger server was moved to <Firefox_dir>/browser/omni.ja , notably chrome/devtools/modules/devtools/shared/Loader.jsm (mapped to resource://devtools/shared/Loader.jsm). Such files are not accessible in Firefox -app mode.
I tried to extract chrome/devtools/modules/devtools and chrome/zh-CN/locale/zh-CN/devtools from <Firefox_dir>/browser/omni.ja and copy them to my app. The debugger server can start, but still can't connect to it, but I think this may be another issue.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•