Browse files

Enable debugging through NARWHAL_DEBUGGER

  • Loading branch information...
1 parent 54c59b0 commit 3a0b0d36b02e331d19bbce5c3280b36ba8bce383 Tom Robinson committed Feb 13, 2010
Showing with 11 additions and 0 deletions.
  1. +2 −0 NWDebug.m
  2. +4 −0 bin/narwhal-jsc
  3. +5 −0 bootstrap.js
View
2 NWDebug.m
@@ -152,6 +152,8 @@ void NW_register_defaults()
[NSNumber numberWithBool:YES], @"WebKit Web Inspector Setting - debuggerEnabled",
[NSNumber numberWithBool:YES], @"WebKit Web Inspector Setting - profilerEnabled",
+ @"scripts", @"WebKit Web Inspector Setting - lastActivePanel",
+
//[NSNumber numberWithBool:YES], @"WebKit Web Inspector Setting - resourceTrackingEnabled",
nil]];
View
4 bin/narwhal-jsc
@@ -13,6 +13,10 @@ done
# NARWHAL_ENGINE_HOME is the 2nd ancestor directory of this shell script
export NARWHAL_ENGINE_HOME=$(dirname -- "$(dirname -- "$SELF_PATH")")
+if [ "$NARWHAL_DEBUGGER" ] && [ "$NARWHAL_DEBUGGER" -ne 0 ]; then
+ NARWHAL_JSC_MODE="webkit-debug"
+fi
+
# determine mode
if [ -z "$NARWHAL_JSC_MODE" ] && [ -f "$NARWHAL_ENGINE_HOME/narwhal-jsc.conf" ]; then
source "$NARWHAL_ENGINE_HOME/narwhal-jsc.conf"
View
5 bootstrap.js
@@ -8,6 +8,11 @@
profiling = true;
_inspector.startProfilingJavaScript_();
}
+
+ if (typeof _inspector !== "undefined" && envEnabled("NARWHAL_DEBUGGER")) {
+ _inspector.show_();
+ _inspector.startDebuggingJavaScript_();
+ }
var prefix = ENV['NARWHAL_HOME'];
var enginePrefix = ENV['NARWHAL_ENGINE_HOME'];

0 comments on commit 3a0b0d3

Please sign in to comment.