@@ -97,6 +97,9 @@ public final class Browser implements Fn.Presenter, Fn.KeepAlive, Flushable,
9797 * If the property is not specified the system tries <b>GTK</b> mode first,
9898 * followed by <b>AWT</b> and then tries to execute <code>xdg-open</code>
9999 * (default LINUX command to launch a browser from a shell script).
100+ * <p>
101+ * In addition to the above properties, it is possible to also enable
102+ * debugging by setting <code>com.dukescript.presenters.browserDebug=true</code>.
100103 */
101104 public Browser () {
102105 this (new Config ());
@@ -112,7 +115,7 @@ public Browser(Config config) {
112115 }
113116
114117 Browser (String app , Config config , Supplier <HttpServer <?,?,?, ?>> serverProvider ) {
115- this .serverProvider = serverProvider != null ? serverProvider : GrizzlyServer ::new ;
118+ this .serverProvider = serverProvider != null ? serverProvider : SimpleServer ::new ;
116119 this .app = app ;
117120 this .config = new Config (config );
118121 }
@@ -216,7 +219,7 @@ static <T extends Exception> T raise(Class<T> aClass, Exception ex) throws T {
216219 public final static class Config {
217220 private Consumer <URI > browser ;
218221 Integer port ;
219- boolean debug ;
222+ boolean debug = Boolean . getBoolean ( "com.dukescript.presenters.browserDebug" ) ;
220223
221224 /**
222225 * Default constructor.
@@ -306,7 +309,7 @@ public Config port(int port) {
306309 * @return this instance
307310 * @since 1.8
308311 */
309- Config debug (boolean debug ) {
312+ public Config debug (boolean debug ) {
310313 this .debug = debug ;
311314 return this ;
312315 }
0 commit comments