mirror of
https://github.com/adelphes/android-dev-ext.git
synced 2025-12-23 09:59:25 +00:00
Add support for ADB server environment variables (#96)
* support ADB env vars for configuring the server connection * update startADBServer to use common adb socket params * use adbSocket config value to set adb host and port * make sure env var values are trimmed * pretty-print launch args and env vars * use adb socket host for JDWP connections * allow JDWP port to be fixed * include the command detail in adb command failures * configure adb socket and jdwp port parameters for attach configs * bump version 1.3.0
This commit is contained in:
@@ -52,9 +52,14 @@ class Debugger extends EventEmitter {
|
||||
|
||||
static portManager = {
|
||||
portrange: { lowest: 31000, highest: 31099 },
|
||||
fixedport: 0,
|
||||
inuseports: new Set(),
|
||||
debuggers: {},
|
||||
reserveport: function () {
|
||||
if (this.fixedport > 0 && this.fixedport < 65536) {
|
||||
this.inuseports.add(this.fixedport);
|
||||
return this.fixedport;
|
||||
}
|
||||
// choose a random port to use each time
|
||||
for (let i = 0; i < 10000; i++) {
|
||||
const portidx = this.portrange.lowest + ((Math.random() * 100) | 0);
|
||||
|
||||
Reference in New Issue
Block a user