Index: lib/src/runner/browser/dartium.dart |
diff --git a/lib/src/runner/browser/dartium.dart b/lib/src/runner/browser/dartium.dart |
index 8e6a8a30c6431d2b6f10ed80ca7e98a4332a8a72..b7ae86f68c0bf7f2a309b93e5eb96cafbc23eb7e 100644 |
--- a/lib/src/runner/browser/dartium.dart |
+++ b/lib/src/runner/browser/dartium.dart |
@@ -30,7 +30,7 @@ class Dartium extends Browser { |
final Future<Uri> observatoryUrl; |
- factory Dartium(url, {String executable}) { |
+ factory Dartium(url, {String executable, bool debug: false}) { |
var completer = new Completer.sync(); |
return new Dartium._(() async { |
if (executable == null) executable = _defaultExecutable(); |
@@ -48,9 +48,11 @@ class Dartium extends Browser { |
"--disable-translate" |
], environment: {"DART_FLAGS": "--checked"}); |
- // The first observatory URL emitted is for the empty start page; the |
- // second is actually for the host page. |
- completer.complete(_getObservatoryUrl(process.stdout)); |
+ if (debug) { |
+ completer.complete(_getObservatoryUrl(process.stdout)); |
+ } else { |
+ completer.complete(null); |
+ } |
process.exitCode |
.then((_) => new Directory(dir).deleteSync(recursive: true)); |