Package com.google.apphosting.runtime
Class CloudDebuggerAgent
- java.lang.Object
-
- com.google.apphosting.runtime.CloudDebuggerAgent
-
public final class CloudDebuggerAgent extends Object
Native methods exposed by Java Cloud Debugger agent.These methods should only be called if the Cloud Debugger is enabled. Otherwise these calls will throw exception. The debugger agent is loaded very early, so these methods can be used at any time.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidbind(ClassLoader debuggerInternalsClassLoader)Starts the initialization sequence of the Java Cloud Debugger agent.static byte[][]dequeueBreakpointUpdates()Pulls breakpoint updates to send to the Cloud Debugger service through AppServer.static booleanhasBreakpointUpdates()Verifies if there are breakpoint updates to send to the Cloud Debugger service.static voidsetActiveBreakpoints(byte[][] breakpoints)Updates the list of active breakpoints in the debugger.static voidsetApplication(String[] classPath, CloudDebuggerCallback callback)Hooks up Cloud Debugger to the application.
-
-
-
Method Detail
-
bind
public static void bind(ClassLoader debuggerInternalsClassLoader)
Starts the initialization sequence of the Java Cloud Debugger agent.- Parameters:
debuggerInternalsClassLoader- ClassLoader object to use to load internal debugger Java classes.
-
setApplication
public static void setApplication(String[] classPath, CloudDebuggerCallback callback)
Hooks up Cloud Debugger to the application.Multiple paths in
classPathare separated withFile.pathSeparator. The debugger is exploring all the paths recursively opening .JAR files as they are encountered.This function must be called after
bindbut before the first breakpoint is set. Setting breakpoints will fail until this method is called.- Parameters:
classPath- paths to application classescallback- Callback interface used by Cloud Debugger to query AppEngine Classic runtime
-
setActiveBreakpoints
public static void setActiveBreakpoints(byte[][] breakpoints)
Updates the list of active breakpoints in the debugger.- Parameters:
breakpoints- list of currently active breakpoints, where each breakpoint is a serialized "com.google.protos.google.cloud.debugger.v1.CloudDebuggerData.Breakpoint" message.
-
hasBreakpointUpdates
public static boolean hasBreakpointUpdates()
Verifies if there are breakpoint updates to send to the Cloud Debugger service.- Returns:
- true if there are breakpoint updates available, false otherwise.
-
dequeueBreakpointUpdates
public static byte[][] dequeueBreakpointUpdates()
Pulls breakpoint updates to send to the Cloud Debugger service through AppServer.- Returns:
- serialized
com.google.protos.google.cloud.debugger.v1.CloudDebuggerData.Breakpointmessages or null if no breakpoint updates available.
-
-