Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions dwds/lib/dwds.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,11 @@ class Dwds {
bool useSseForInjectedClient,
UrlEncoder urlEncoder,
bool spawnDds,
// TODO(elliette): DevTools is inconsistently capitalized throughout this
// file. Change all occurances of devtools/Devtools to devTools/DevTools.
bool enableDevtoolsLaunch,
DevtoolsLauncher devtoolsLauncher,
bool launchDevToolsInNewWindow,
Uri sdkDir,
Uri librariesPath,
bool emitDebugEvents,
Expand All @@ -123,6 +126,7 @@ class Dwds {
useSseForDebugBackend ??= true;
useSseForInjectedClient ??= true;
enableDevtoolsLaunch ??= true;
launchDevToolsInNewWindow ??= true;
spawnDds ??= true;
globalLoadStrategy = loadStrategy;
emitDebugEvents ??= true;
Expand Down Expand Up @@ -183,6 +187,7 @@ class Dwds {
expressionCompiler,
injected,
spawnDds,
launchDevToolsInNewWindow,
);

return Dwds._(
Expand Down
6 changes: 4 additions & 2 deletions dwds/lib/src/handlers/dev_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class DevHandler {
final bool _useSseForInjectedClient;
final bool _serveDevTools;
final bool _spawnDds;
final bool _launchDevToolsInNewWindow;
final ExpressionCompiler _expressionCompiler;
final DwdsInjector _injected;

Expand All @@ -87,7 +88,8 @@ class DevHandler {
this._serveDevTools,
this._expressionCompiler,
this._injected,
this._spawnDds) {
this._spawnDds,
this._launchDevToolsInNewWindow) {
_subs.add(buildResults.listen(_emitBuildResults));
_listen();
if (_extensionBackend != null) {
Expand Down Expand Up @@ -525,7 +527,7 @@ class DevHandler {
if (!_serveDevTools) return;
emitEvent(DwdsEvent.devtoolsLaunch());
await remoteDebugger.sendCommand('Target.createTarget', params: {
'newWindow': true,
'newWindow': _launchDevToolsInNewWindow,
'url': Uri(
scheme: 'http',
host: _devTools.hostname,
Expand Down