mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 935014 - Allows to specify the devtool debuggger port via the command line. r=fabrice
This commit is contained in:
parent
5fa6d5c1cf
commit
a9ca128008
@ -46,7 +46,30 @@ function setupButtons() {
|
||||
});
|
||||
}
|
||||
|
||||
function checkDebuggerPort() {
|
||||
// XXX: To be removed once bug 942756 lands.
|
||||
// We are hacking 'unix-domain-socket' pref by setting a tcp port (number).
|
||||
// DebuggerServer.openListener detects that it isn't a file path (string),
|
||||
// and starts listening on the tcp port given here as command line argument.
|
||||
|
||||
// Get the command line arguments that were passed to the b2g client
|
||||
let args = window.arguments[0].QueryInterface(Ci.nsICommandLine);
|
||||
|
||||
let dbgport;
|
||||
try {
|
||||
dbgport = args.handleFlagWithParam('start-debugger-server', false);
|
||||
} catch(e) {}
|
||||
|
||||
if (dbgport) {
|
||||
dump('Opening debugger server on ' + dbgport + '\n');
|
||||
Services.prefs.setCharPref('devtools.debugger.unix-domain-socket', dbgport);
|
||||
navigator.mozSettings.createLock().set(
|
||||
{'debugger.remote-mode': 'adb-devtools'});
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener('ContentStart', function() {
|
||||
enableTouch();
|
||||
setupButtons();
|
||||
checkDebuggerPort();
|
||||
});
|
||||
|
@ -171,7 +171,7 @@ exports.SimulatorProcess = Class({
|
||||
Cu.reportError(profile);
|
||||
|
||||
// NOTE: push dbgport option on the b2g-desktop commandline
|
||||
args.push("-dbgport", "" + this.remoteDebuggerPort);
|
||||
args.push("-start-debugger-server", "" + this.remoteDebuggerPort);
|
||||
|
||||
// Ignore eventual zombie instances of b2g that are left over
|
||||
args.push("-no-remote");
|
||||
|
Loading…
Reference in New Issue
Block a user