Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/devtools_server/lib/src/server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const argHeadlessMode = 'headless';
const argDebugMode = 'debug';
const argLaunchBrowser = 'launch-browser';
const argMachine = 'machine';
const argHost = 'host';
const argPort = 'port';
const argProfileMemory = 'profile-memory';
const argTryPorts = 'try-ports';
Expand All @@ -50,6 +51,11 @@ final argParser = ArgParser()
abbr: 'h',
help: 'Prints help output.',
)
..addOption(
argHost,
defaultsTo: 'localhost',
help: 'Hostname to serve DevTools on.',
)
..addOption(
argPort,
defaultsTo: '9100',
Expand Down Expand Up @@ -141,6 +147,7 @@ Future<HttpServer> serveDevToolsWithArgs(
final numPortsToTry =
args[argTryPorts] != null ? int.tryParse(args[argTryPorts]) ?? 1 : 1;
final bool verboseMode = args[argVerbose];
final String hostname = args[argHost];

// Support collecting profile data.
final String vmUri = args[argVmUri];
Expand All @@ -160,6 +167,7 @@ Future<HttpServer> serveDevToolsWithArgs(
serviceProtocolUri: vmUri,
profileFilename: profileAbsoluteFilename,
verboseMode: verboseMode,
hostname: hostname,
);
}

Expand Down