Make it easier to debug the app by sleeping for a while if a property is set
If the property log.tag.LODesktopSleepOnCreate is set to "VERBOSE" then sleep after liblo-native-code.so has been loaded to give the developer a chance to start ndk-gdb and set breakpoints. Yeah, a bit silly to overload a logging property like this, but it was the first idea I came up with. Change-Id: I665f87778d083d2d167a5d16f24e2d50b1fba042
This commit is contained in:
parent
e4bad391fc
commit
d2a640d69e
@ -80,9 +80,6 @@ public class Desktop
|
||||
// Avoid all the old style OSL_TRACE calls especially in vcl
|
||||
Bootstrap.putenv("SAL_LOG=+WARN+INFO");
|
||||
|
||||
// Log.i(TAG, "Sleeping NOW");
|
||||
// Thread.sleep(20000);
|
||||
|
||||
bootstrapContext.componentContext = com.sun.star.comp.helper.Bootstrap.defaultBootstrap_InitialComponentContext();
|
||||
|
||||
Log.i(TAG, "context is" + (bootstrapContext.componentContext!=null ? " not" : "") + " null");
|
||||
@ -120,6 +117,21 @@ public class Desktop
|
||||
|
||||
Bootstrap.setCommandArgs(argv);
|
||||
|
||||
// To enable the sleep below, do: "adb shell setprop
|
||||
// log.tag.LODesktopSleepOnCreate VERBOSE". Yeah, has
|
||||
// nothing to do with logging as such.
|
||||
|
||||
// This should be after at least one call to something in
|
||||
// the Bootstrap class as it is the static initialiser
|
||||
// that loads the lo-native-code library, and presumably
|
||||
// in ndk-gdb you want to set a breapoint in some native
|
||||
// code...
|
||||
|
||||
if (Log.isLoggable("LODesktopSleepOnCreate", Log.VERBOSE)) {
|
||||
Log.i(TAG, "Sleeping, start ndk-gdb NOW if you intend to debug");
|
||||
Thread.sleep(20000);
|
||||
}
|
||||
|
||||
if (bootstrapContext == null)
|
||||
initBootstrapContext();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user