From a5745d5da0e828fa5a5694142435e014a2948cf2 Mon Sep 17 00:00:00 2001 From: James Roseborough Date: Wed, 10 Oct 2007 04:34:46 +0000 Subject: [PATCH] Turn off debug support by default. --- src/main/java/lua/debug/DebugStackState.java | 6 ++++-- src/main/java/lua/debug/DebugUtils.java | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/lua/debug/DebugStackState.java b/src/main/java/lua/debug/DebugStackState.java index fce7900e..295f040d 100644 --- a/src/main/java/lua/debug/DebugStackState.java +++ b/src/main/java/lua/debug/DebugStackState.java @@ -120,7 +120,8 @@ public class DebugStackState extends StackState implements DebugRequestListener // debug hooks public void debugHooks( int pc ) { - DebugUtils.println("entered debugHook..."); + if(DebugUtils.IS_DEBUG) + DebugUtils.println("entered debugHook..."); if ( exiting ) throw new AbortException("exiting"); @@ -129,7 +130,8 @@ public class DebugStackState extends StackState implements DebugRequestListener // anytime the line doesn't change we keep going int line = getLineNumber(calls[cc]); - DebugUtils.println("debugHook - executing line: " + line); + if(DebugUtils.IS_DEBUG) + DebugUtils.println("debugHook - executing line: " + line); if ( !stepping && lastline == line ) { return; } diff --git a/src/main/java/lua/debug/DebugUtils.java b/src/main/java/lua/debug/DebugUtils.java index 898211c7..61d45219 100644 --- a/src/main/java/lua/debug/DebugUtils.java +++ b/src/main/java/lua/debug/DebugUtils.java @@ -27,7 +27,7 @@ import lua.io.LoadState; import lua.value.LString; public class DebugUtils { - public static final boolean IS_DEBUG = true; + public static final boolean IS_DEBUG = false; public static void println(String message) { if (IS_DEBUG) {