All Packages Class Hierarchy This Package Previous Next Index
Class sun.tools.debug.RemoteDebugger
java.lang.Object
|
+----sun.tools.debug.RemoteDebugger
- public class RemoteDebugger
- extends Object
The RemoteDebugger class defines a client interface to the Java debugging
classes. It is used to instantiate a connection with the Java interpreter
being debugged.
-
RemoteDebugger(String, DebuggerCallback, boolean)
- Create a remote debugger.
-
RemoteDebugger(String, String, DebuggerCallback, boolean)
- Create a remote debugger, connecting it with a running Java
interpreter.
To connect to a running interpreter, it must be
started with the "-debug" option, whereupon it will print out
the password for that debugging session.
-
addSystemThread()
- Add the calling thread to the list of threads which aren't
suspended by the RemoteDebugger.
-
addSystemThread(Thread)
- Add the specified thread to the list of threads which aren't
suspended by the RemoteDebugger.
-
close()
- Close the connection to the remote debugging agent.
-
findClass(String)
- Find a specified class.
-
freeMemory()
- Report the free memory available to the Java interpreter being debugged.
-
gc(RemoteObject[])
- Free all objects referenced by the debugger.
-
get(Integer)
- Get an object from the remote object cache.
-
getExceptionCatchList()
- Return the list of the exceptions the debugger will stop on.
-
getSourcePath()
- Return the source file path the Agent is currently using.
-
itrace(boolean)
- Turn on/off instruction tracing.
-
listBreakpoints()
- Return a list of the breakpoints which are currently set.
-
listClasses()
- List the currently known classes.
-
listThreadGroups(RemoteThreadGroup)
- List threadgroups
-
run(int, String[])
- Load and run a runnable Java class, with any optional parameters.
-
setSourcePath(String)
- Specify the list of paths to use when searching for a source file.
-
totalMemory()
- Report the total memory usage of the Java interpreter being debugged.
-
trace(boolean)
- Turn on/off method call tracing.
RemoteDebugger
method RemoteDebugger(host=String, -
password=String, -
client=DebuggerCallback, -
verbose=boolean) public Signals Exception
- Create a remote debugger, connecting it with a running Java
interpreter.
To connect to a running interpreter, it must be
started with the "-debug" option, whereupon it will print out
the password for that debugging session.
- Parameters:
- host - the name of the system where a debuggable Java instance is running (default is localhost).
- password - the password reported by the debuggable Java instance. This should be null when starting a client interpreter.
- client - the object to which notification messages are sent (it must support the DebuggerCallback interface)
- verbose - turn on internal debugger message text
- Throws: Exception
- if a general exception occurs.
RemoteDebugger
method RemoteDebugger(javaArgs=String, -
client=DebuggerCallback, -
verbose=boolean) public Signals Exception
- Create a remote debugger.
- Parameters:
- javaArgs - optional java command-line parameters, such as -classpath
- client - the object to which notification messages are sent (it must support the DebuggerCallback interface)
- verbose - turn on internal debugger message text
- Throws: Exception
- if a general exception occurs.
close
method close() public
- Close the connection to the remote debugging agent.
get
method get(id=Integer) returns RemoteObject public
- Get an object from the remote object cache.
- Parameters:
- id - the remote object's id
- Returns:
- the specified RemoteObject, or null if not cached.
listClasses
method listClasses() returns RemoteClass[] public Signals Exception
- List the currently known classes.
- Throws: Exception
- if a general exception occurs.
findClass
method findClass(name=String) returns RemoteClass public Signals Exception
- Find a specified class. If the class isn't already known by the
remote debugger, the lookup request will be passed to the Java
interpreter being debugged.
NOTE: Substrings, such as "String" for "java.lang.String" will
return with the first match, and will not be successfully found
if the request is passed to the remote interpreter.
- Parameters:
- name - the name (or a substring of the name)of the class
- Returns:
- the specified (Remote)Class, or null if not found.
- Throws: Exception
- if a general exception occurs.
listThreadGroups
method listThreadGroups(tg=RemoteThreadGroup) returns RemoteThreadGroup[] public Signals Exception
- List threadgroups
- Parameters:
- tg - the threadgroup which hold the groups to be listed, or null for all threadgroups
- Throws: Exception
- if a general exception occurs.
gc
method gc(save_list=RemoteObject[]) public Signals Exception
- Free all objects referenced by the debugger.
The remote debugger maintains a copy of each object it has examined,
so that references won't become invalidated by the garbage collector
of the Java interpreter being debugged. The gc() method frees all
all of these references, except those specified to save.
- Parameters:
- save_list - the list of objects to save.
- Throws: Exception
- if a general exception occurs.
trace
method trace(traceOn=boolean) public Signals Exception
- Turn on/off method call tracing.
When turned on, each method call is reported to the stdout of the
Java interpreter being debugged. This output is not captured in
any way by the remote debugger.
- Parameters:
- traceOn - turn tracing on or off
- Throws: Exception
- if a general exception occurs.
itrace
method itrace(traceOn=boolean) public Signals Exception
- Turn on/off instruction tracing.
When turned on, each Java instruction is reported to the stdout of the
Java interpreter being debugged. This output is not captured in
any way by the remote debugger.
- Parameters:
- traceOn - turn tracing on or off
- Throws: Exception
- if a general exception occurs.
totalMemory
method totalMemory() returns int public Signals Exception
- Report the total memory usage of the Java interpreter being debugged.
- Throws: Exception
- if a general exception occurs.
freeMemory
method freeMemory() returns int public Signals Exception
- Report the free memory available to the Java interpreter being debugged.
- Throws: Exception
- if a general exception occurs.
run
method run(argc=int, -
argv=String[]) returns RemoteThreadGroup public Signals Exception
- Load and run a runnable Java class, with any optional parameters.
The class is started inside a new threadgroup in the Java interpreter
being debugged.
NOTE: Although it is possible to run multiple runnable classes from
the same Java interpreter, there is no guarantee that all applets
will work cleanly with each other. For example, two applets may want
exclusive access to the same shared resource,such as a specific port.
- Parameters:
- argc - the number of parameters
- argv - the array of parameters: the class to be run is
first, followed by any optional parameters used by that class.
- Returns:
- the new ThreadGroup the class is running in, or null on error
- Throws: Exception
- if a general exception occurs.
listBreakpoints
method listBreakpoints() returns String[] public Signals Exception
- Return a list of the breakpoints which are currently set.
- Returns:
- an array of Strings of the form "class_name:line_number".
- Throws: Exception
- if a general exception occurs.
getExceptionCatchList
method getExceptionCatchList() returns String[] public Signals Exception
- Return the list of the exceptions the debugger will stop on.
- Returns:
- an array of exception class names, which may be zero-length.
- Throws: Exception
- if a general exception occurs.
getSourcePath
method getSourcePath() returns String public Signals Exception
- Return the source file path the Agent is currently using.
- Returns:
- a string consisting of a list of colon-delineated paths.
- Throws: Exception
- if a general exception occurs.
setSourcePath
method setSourcePath(pathList=String) public Signals Exception
- Specify the list of paths to use when searching for a source file.
- Parameters:
- pathList - a string consisting of a list of colon-delineated paths.
- Throws: Exception
- if a general exception occurs.
addSystemThread
method addSystemThread() public
- Add the calling thread to the list of threads which aren't
suspended by the RemoteDebugger. Typically these are only
threads used by a debugger client. The thread which created
the RemoteDebugger instance is automatically added, as is
the AgentIn and other debugger-specific threads.
addSystemThread
method addSystemThread(t=Thread) public
- Add the specified thread to the list of threads which aren't
suspended by the RemoteDebugger. Typically these are only
threads used by a debugger client. The thread which created
the RemoteDebugger instance is automatically added, as is
the AgentIn and other debugger-specific threads.
All Packages Class Hierarchy This Package Previous Next Index