<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -21,6 +21,10 @@ if [ -f &quot;$NARWHAL_HOME/narwhal.conf&quot; ]; then
     source &quot;$NARWHAL_HOME&quot;/narwhal.conf
 fi
 
+if [ -n &quot;$NARWHAL_DEBUG&quot; ]; then
+    export NARWHAL_DEBUG
+fi
+
 # if NARWHAL_ENGINE isn't yet set, set it to the default engine, and export it
 if [ -z &quot;$NARWHAL_ENGINE&quot; ]; then
     NARWHAL_ENGINE=$NARWHAL_DEFAULT_ENGINE</diff>
      <filename>bin/narwhal</filename>
    </modified>
    <modified>
      <diff>@@ -145,6 +145,11 @@ Environment Variables
     command line arguments have been parsed, which
     happens before packages are loaded.
 
+*   `NARWHAL_DEBUGGER` starts Narwhal with a debugger
+    GUI if one is available for the engine.  For the
+    Rhino-Java engine, this activates the Rhino Java
+    AWT-based debugger.
+
 *   `SEA` is an environment variable set by `sea` that
     notifies `narwhal` to search the given virtual
     environment for packages first.  This function can</diff>
      <filename>docs/narwhal.md</filename>
    </modified>
    <modified>
      <diff>@@ -33,7 +33,11 @@ if [ &quot;$(which cygpath 2&gt;/dev/null)&quot; ]; then
     export NARWHAL_ENGINE_HOME=$(cygpath -wa -- &quot;$NARWHAL_ENGINE_HOME&quot;)
 fi
 
-JAVA_MAIN=org.mozilla.javascript.tools.shell.Main
+if [ -z &quot;$NARWHAL_DEBUGGER&quot; ] || [ &quot;$NARWHAL_DEBUGGER&quot; -eq 0 ]; then
+    JAVA_MAIN=org.mozilla.javascript.tools.shell.Main
+else
+    JAVA_MAIN=org.mozilla.javascript.tools.debugger.Main
+fi
 
 # check the java version number in the most complicated fashion imaginable
 JAVA_VERSION=$(java -version 2&gt;&amp;1 | awk -F '[ &quot;.]+' 'NR==1 {print $3 &quot;.&quot; $4}')</diff>
      <filename>engines/rhino/bin/narwhal-rhino</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,13 @@
 
-# Rhino
-NARWHAL_DEFAULT_ENGINE=&quot;rhino&quot;
+# If a debugger is available for your engine, use it?
+#NARWHAL_DEBUGGER=1
+
+# Alternate engines
 
-# k7
-#NARWHAL_DEFAULT_ENGINE=&quot;k7&quot;
+# Rhino
+#NARWHAL_DEFAULT_ENGINE=&quot;rhino&quot;
 
-#NARWHAL_ENGINE_HOME=&quot;.&quot;
+# JavaScript Core
+#NARWHAL_ENGINE=&quot;jsc&quot;
+#NARWHAL_ENGINE_HOME=&quot;packages/jsc&quot;
 </diff>
      <filename>narwhal.conf.template</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8dcfb60f526f653b721de72a8ac238a35390c5dc</id>
    </parent>
  </parents>
  <author>
    <name>kriskowal</name>
    <email>kris.kowal@cixar.com</email>
  </author>
  <url>http://github.com/tlrobinson/narwhal/commit/cb6d392524dac724719310bc2c1f281abb92a2f2</url>
  <id>cb6d392524dac724719310bc2c1f281abb92a2f2</id>
  <committed-date>2009-10-03T21:52:45-07:00</committed-date>
  <authored-date>2009-10-03T21:52:45-07:00</authored-date>
  <message>Added a debugger option.</message>
  <tree>95470bf15c03b0f240fdaed5b8beca6f7695c388</tree>
  <committer>
    <name>kriskowal</name>
    <email>kris.kowal@cixar.com</email>
  </committer>
</commit>
