Allow debug class setting from system properties.
This commit is contained in:
@@ -43,6 +43,7 @@ abstract public class Platform {
|
|||||||
public static final String PROPERTY_LUAJ_DEBUG_SUSPEND_AT_START = "Luaj-Debug-SuspendAtStart";
|
public static final String PROPERTY_LUAJ_DEBUG_SUSPEND_AT_START = "Luaj-Debug-SuspendAtStart";
|
||||||
public static final String PROPERTY_LUAJ_DEBUG_HOST = "Luaj-Debug-Host";
|
public static final String PROPERTY_LUAJ_DEBUG_HOST = "Luaj-Debug-Host";
|
||||||
public static final String PROPERTY_LUAJ_DEBUG_PORT = "Luaj-Debug-Port";
|
public static final String PROPERTY_LUAJ_DEBUG_PORT = "Luaj-Debug-Port";
|
||||||
|
public static final String PROPERTY_LUAJ_DEBUG_CLASS = "Luaj-Debug-Class";
|
||||||
|
|
||||||
private static Platform instance;
|
private static Platform instance;
|
||||||
|
|
||||||
@@ -84,7 +85,8 @@ abstract public class Platform {
|
|||||||
LuaState vm = null;
|
LuaState vm = null;
|
||||||
if (isDebug) {
|
if (isDebug) {
|
||||||
try {
|
try {
|
||||||
vm = (LuaState) Class.forName(DEBUG_CLASS_NAME).newInstance();
|
String c = p.getProperty(PROPERTY_LUAJ_DEBUG_CLASS);
|
||||||
|
vm = (LuaState) Class.forName(c!=null? c: DEBUG_CLASS_NAME).newInstance();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println("Warning: no debug support, " + e);
|
System.out.println("Warning: no debug support, " + e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user