| Modifier and Type | Method and Description |
|---|---|
boolean |
bind()
Allow the session to start communicating with the player.
|
void |
breakOnCaughtExceptions(boolean b)
The player always halts on exceptions that are not going to be caught;
this call allows the debugger to control its behavior when an exception
that *will* be caught is thrown.
|
Value |
callConstructor(String classname,
Value[] args)
Invokes a constructor in the player.
|
Value |
callFunction(Value thisObject,
String functionName,
Value[] args)
Invokes a function.
|
Location |
clearBreakpoint(Location location)
Remove a breakpoint at given location.
|
boolean |
clearExceptionBreakpoint(String exceptionClass)
Clears an exception breakpoint.
|
Watch |
clearWatch(Watch watch)
Remove a previously created watchpoint.
|
Value |
evalAs(Value value,
Value type)
Evaluate the ActionScript expression "value as type"
|
boolean |
evalIn(Value property,
Value object)
Evaluate the ActionScript expression "property in object"
|
boolean |
evalInstanceof(Value value,
String type)
Evaluate the ActionScript expression "value instanceof type"
|
boolean |
evalInstanceof(Value value,
Value type)
Evaluate the ActionScript expression "value instanceof type"
|
boolean |
evalIs(Value value,
String type)
Evaluate the ActionScript expression "value is type"
|
boolean |
evalIs(Value value,
Value type)
Evaluate the ActionScript expression "value is type"
|
Location[] |
getBreakpointList()
Get a list of the current breakpoints.
|
Exception |
getDisconnectCause()
Returns the root SocketException that caused the rxMessage()
thread to shut down.
|
int |
getEventCount()
Returns the number of events currently in the queue.
|
Frame[] |
getFrames()
Returns an array of frames that identify the location and contain
arguments, locals and 'this' information for each frame on the
function call stack.
|
Value |
getGlobal(String name)
Looks up a global name, like "MyClass", "String", etc.
|
Process |
getLaunchProcess()
Returns the Process object, if any, that triggered this Session.
|
int |
getPreference(String pref)
Return the value of a particular preference item
|
static Session |
getRaw(Session s)
Returns the raw Session underlying a ThreadSafeSession.
|
SourceLocator |
getSourceLocator()
Gets the SourceLocator for this session.
|
SwfInfo[] |
getSwfs()
Obtain information about the various SWF(s) that have been
loaded into the Player, for this session.
|
Object |
getSyncObject() |
static Object |
getSyncObject(Session s) |
String |
getURI()
Returns the URL that identifies this Session.
|
Value |
getValue(long valueId)
From a given value identifier return a Value.
|
Variable[] |
getVariableList()
Deprecated.
|
Watch[] |
getWatchList()
Get a list of the current watchpoint.
|
Isolate[] |
getWorkers()
Get an array of all workers that the debugger knows of.
|
IsolateSession |
getWorkerSession(int isolateId)
Return the worker specific session object that can be used
to communicate with that worker.
|
boolean |
isConnected()
Is the Player currently connected for this session.
|
boolean |
isSuspended()
Is the Player currently halted awaiting requests, such as continue,
stepOut, stepIn, stepOver.
|
DebugEvent |
nextEvent()
Removes and returns the next event from queue
|
Isolate[] |
refreshWorkers()
Ask the player again for a list of all workers.
|
void |
resume()
Continue a halted session.
|
Location |
setBreakpoint(int fileId,
int lineNum)
Set a breakpoint on a line within the given file.
|
boolean |
setExceptionBreakpoint(String exceptionClass)
Set an exception breakpoint.
|
void |
setLauncher(ILauncher launcher)
Sets the ILauncher instance which is associated with this session.
|
void |
setPreference(String pref,
int value)
Adjust the preferences for this session; see SessionManager
for a list of valid preference strings.
|
void |
setSourceLocator(SourceLocator sourceLocator)
Sets the SourceLocator for this session.
|
Watch |
setWatch(Value v,
String memberName,
int kind)
Set a watchpoint on a given variable.
|
Watch |
setWatch(Watch watch)
Enables or disables a watchpoint.
|
void |
stepContinue()
Continue the process of stepping.
|
void |
stepInto()
Step to the next executable source line within the
program, will enter into functions.
|
void |
stepOut()
Step out of the current method/function onto the
next executable soruce line.
|
void |
stepOver()
Step to the next executable source line within
the program, will NOT enter into functions.
|
boolean |
supportsConcurrency()
Returns whether the target player supports concurrency.
|
boolean |
supportsWatchpoints()
Returns whether the target player supports watchpoints.
|
void |
suspend()
Halt a running session.
|
int |
suspendReason()
Returns a SuspendReason integer which indicates
why the Player has suspended execution.
|
void |
terminate()
Permanently stops the debugging session and breaks the connection.
|
void |
unbind()
Permanently stops the debugging session and breaks the
connection.
|
void |
waitForEvent()
Events provide a mechanism whereby status information is provided from
the Player in a timely fashion.
|
static ThreadSafeSession |
wrap(Object syncObj,
Session session)
Wraps a Session inside a ThreadSafeSession.
|
public static ThreadSafeSession wrap(Object syncObj, Session session)
public static Session getRaw(Session s)
public boolean bind()
throws VersionException
Sessionbind in interface SessionVersionException - connected to Player which does not support all API completelypublic Location clearBreakpoint(Location location) throws NoResponseException, NotConnectedException
Session
Warning: setBreakpoint() and
clearBreakpoint() do not keep track of how many times they
have been called for a given Location. For example, if you make two calls
to setBreakpoint() for file X.as line 10, and then one
call to clearBreakpoint() for that same file and line,
then the breakpoint is gone. So, the caller is responsible for keeping
track of whether the user has set two breakpoints at the same location.
clearBreakpoint in interface SessionNoResponseException - if times outNotConnectedException - if Player is disconnected from Sessionpublic Watch clearWatch(Watch watch) throws NoResponseException, NotConnectedException
SessionclearWatch in interface SessionNoResponseException - if times outNotConnectedException - if Player is disconnected from Sessionpublic Location[] getBreakpointList() throws NoResponseException, NotConnectedException
SessiongetBreakpointList in interface SessionNoResponseException - if times outNotConnectedException - if Player is disconnected from Sessionpublic int getEventCount()
SessiongetEventCount in interface Sessionpublic Frame[] getFrames() throws NotConnectedException
SessiongetFrames in interface SessionNotConnectedException - if Player is disconnected from Sessionpublic Process getLaunchProcess()
SessiongetLaunchProcess in interface Sessionpublic int getPreference(String pref) throws NullPointerException
SessiongetPreference in interface Sessionpref - preference name, one of the strings listed in SessionManagerNullPointerException - if pref does not existSessionManagerpublic SwfInfo[] getSwfs() throws NoResponseException
SessiongetSwfs in interface SessionNoResponseException - if times outpublic String getURI()
Sessionpublic Value getValue(long valueId) throws NotSuspendedException, NoResponseException, NotConnectedException
SessiongetValue in interface SessionvalueId - identifier from Value class or
from a call to Value.getId()NotSuspendedException - if Player is runningNoResponseException - if times outNotConnectedException - if Player is disconnected from Sessionpublic Variable[] getVariableList() throws NotSuspendedException, NoResponseException, NotConnectedException, VersionException
SessiongetVariableList in interface SessionNotSuspendedExceptionNoResponseExceptionNotConnectedExceptionVersionExceptionFrame.getLocals(flash.tools.debugger.Session)public Watch[] getWatchList() throws NoResponseException, NotConnectedException
SessiongetWatchList in interface SessionNoResponseException - if times outNotConnectedException - if Player is disconnected from Sessionpublic boolean isConnected()
SessionisConnected in interface Sessionpublic boolean isSuspended()
throws NotConnectedException
SessionisSuspended in interface SessionNotConnectedException - if Player is disconnected from Sessionpublic DebugEvent nextEvent()
Sessionpublic void resume()
throws NotSuspendedException,
NotConnectedException,
NoResponseException
Sessionsuspend() method is called.
This method will NOT block. It will return immediately after the Player resumes execution. Use the isSuspended method to determine when the Player has halted.
resume in interface SessionNotSuspendedException - if Player is already runningNotConnectedException - if Player is disconnected from SessionNoResponseException - if times outpublic Location setBreakpoint(int fileId, int lineNum) throws NoResponseException, NotConnectedException
Session
Warning: setBreakpoint() and
clearBreakpoint() do not keep track of how many times they
have been called for a given Location. For example, if you make two calls
to setBreakpoint() for file X.as line 10, and then one
call to clearBreakpoint() for that same file and line,
then the breakpoint is gone. So, the caller is responsible for keeping
track of whether the user has set two breakpoints at the same location.
setBreakpoint in interface SessionNoResponseException - if times outNotConnectedException - if Player is disconnected from Sessionpublic void setPreference(String pref, int value)
SessionsetPreference in interface Sessionpref - preference name, one of the strings listed abovevalue - value to set for preferencepublic Watch setWatch(Value v, String memberName, int kind) throws NoResponseException, NotConnectedException, NotSupportedException
SessionSpecification of the variable item to be watched requires two pieces of information (similar to setScalarMember()) The Variable and the name of the particular member to be watched within the variable. For example if the watchpoint is to be applied to 'a.b.c'. First the Value for object 'a.b' must be obtained and then the call setWatch(v, "c", ...) can be issued. The watchpoint can be triggered (i.e. the Player suspended) when either a read or write (or either) occurs on the variable. If the Player is suspended due to a watchpoint being fired, then the suspendReason() call will return SuspendReason.WATCH.
Setting a watchpoint multiple times on the same variable will result in the old watchpoint being removed from the list and a new watchpoint being added to the end of the list.
Likewise, if a previously existing watchpoint is modified by specifiying a different kind variable then the old watchpoint will be removed from the list and a new watchpoint will be added to the end of the list.
setWatch in interface Sessionv - the variable, upon whose member, the watch is to be placed.kind - access type that will trigger the watchpoint to fire --
read, write, or read/write. See WatchKind.NoResponseException - if times outNotConnectedException - if Player is disconnected from SessionNotSupportedException - if the Player does not support watchpoints,
or does not support watchpoints on this particular member (e.g. because
it is a getter or a dynamic variable).WatchKindpublic Watch setWatch(Watch watch) throws NoResponseException, NotConnectedException, NotSupportedException
SessionsetWatch in interface Sessionwatch - the watch to enable or disableNoResponseExceptionNotConnectedExceptionNotSupportedExceptionpublic void stepContinue()
throws NotSuspendedException,
NoResponseException,
NotConnectedException
SessionstepContinue in interface SessionNotSuspendedException - if Player is runningNoResponseException - if times outNotConnectedException - if Player is disconnected from Sessionpublic void stepInto()
throws NotSuspendedException,
NoResponseException,
NotConnectedException
SessionThis method will NOT block. It will return immediately after the Player resumes execution. Use the isSuspended method to determine when the Player has halted.
stepInto in interface SessionNotSuspendedException - if Player is runningNoResponseException - if times outNotConnectedException - if Player is disconnected from Sessionpublic void stepOut()
throws NotSuspendedException,
NoResponseException,
NotConnectedException
SessionThis method will NOT block. It will return immediately after the Player resumes execution. Use the isSuspended method to determine when the Player has halted.
stepOut in interface SessionNotSuspendedException - if Player is runningNoResponseException - if times outNotConnectedException - if Player is disconnected from Sessionpublic void stepOver()
throws NotSuspendedException,
NoResponseException,
NotConnectedException
SessionThis method will NOT block. It will return immediately after the Player resumes execution. Use the isSuspended method to determine when the Player has halted.
stepOver in interface SessionNotSuspendedException - if Player is runningNoResponseException - if times outNotConnectedException - if Player is disconnected from Sessionpublic void suspend()
throws SuspendedException,
NotConnectedException,
NoResponseException
SessionThis method WILL BLOCK until the Player halts for some reason or an error occurs. During this period, one or more callbacks may be initiated.
suspend in interface SessionSuspendedException - if Player is already suspendedNotConnectedException - if Player is disconnected from SessionNoResponseException - if times outpublic int suspendReason()
throws NotConnectedException
SessionsuspendReason in interface SessionNotConnectedException - if Player is disconnected from Sessionpublic void terminate()
SessionNote that due to platform and browser differences, it should not be assumed that this function will necessarily kill the process being debugged. For example:
If SessionManager.launch() was used to initiate the Session then calling this function also causes getLaunchProcess().destroy() to be called.
Note: this method first calls unbind() if needed.
public void unbind()
SessionNote: this method allows the caller to disconnect from the debugging session (and Player) without terminating the Player. A subsequent call to terminate() will destroy the Player process.
Under normal circumstances this method need not be called since a call to terminate() performs both actions of disconnecting from the Player and destroying the Player process.
public void waitForEvent()
throws NotConnectedException,
InterruptedException
Session
The caller has the option of either polling the event queue via
nextEvent() or calling waitForEvent() which
blocks the calling thread until one or more events exist in the queue.
waitForEvent in interface SessionNotConnectedException - if Session is disconnected from PlayerInterruptedExceptionpublic SourceLocator getSourceLocator()
SessiongetSourceLocator in interface Sessionpublic void setSourceLocator(SourceLocator sourceLocator)
SessionsetSourceLocator in interface Sessionpublic Value callConstructor(String classname, Value[] args) throws PlayerDebugException
SessioncallConstructor in interface SessionPlayerDebugExceptionpublic Value callFunction(Value thisObject, String functionName, Value[] args) throws PlayerDebugException
SessioncallFunction(myobj, "toString", new Value[0]) will call
myobj.toString(). Not supported in Player 9 or AIR 1.0.
If you call this function and the player to which you are connected
doesn't support this feature, this will throw a PlayerDebugException.callFunction in interface SessionPlayerDebugExceptionpublic Value getGlobal(String name) throws NotSuspendedException, NoResponseException, NotConnectedException
SessiongetGlobal in interface Sessionnull if the global does not exist.NotSuspendedExceptionNoResponseExceptionNotConnectedExceptionpublic void breakOnCaughtExceptions(boolean b)
throws NotSupportedException,
NoResponseException
SessionbreakOnCaughtExceptions in interface SessionNotSupportedException - thrown by older players that don't support this feature.NoResponseExceptionpublic boolean evalIs(Value value, Value type) throws PlayerDebugException, PlayerFaultException
SessionevalIs in interface SessionPlayerDebugExceptionPlayerFaultExceptionpublic boolean evalIs(Value value, String type) throws PlayerDebugException, PlayerFaultException
SessionevalIs in interface SessionPlayerDebugExceptionPlayerFaultExceptionpublic boolean evalInstanceof(Value value, Value type) throws PlayerDebugException, PlayerFaultException
SessionevalInstanceof in interface SessionPlayerDebugExceptionPlayerFaultExceptionpublic boolean evalInstanceof(Value value, String type) throws PlayerDebugException, PlayerFaultException
SessionevalInstanceof in interface SessionPlayerDebugExceptionPlayerFaultExceptionpublic boolean evalIn(Value property, Value object) throws PlayerDebugException, PlayerFaultException
SessionevalIn in interface SessionPlayerDebugExceptionPlayerFaultExceptionpublic Value evalAs(Value value, Value type) throws PlayerDebugException, PlayerFaultException
SessionevalAs in interface SessionPlayerDebugExceptionPlayerFaultExceptionpublic boolean supportsWatchpoints()
SessionsupportsWatchpoints in interface SessionSession.setWatch(Value, String, int)public boolean supportsConcurrency()
SessionsupportsConcurrency in interface Session#setActiveIsolate(Value)public Exception getDisconnectCause()
SessiongetDisconnectCause in interface Sessionpublic Isolate[] refreshWorkers() throws NotSupportedException, NotSuspendedException, NoResponseException, NotConnectedException
SessionrefreshWorkers in interface SessionNotSupportedExceptionNotSuspendedExceptionNoResponseExceptionNotConnectedExceptionpublic Isolate[] getWorkers()
SessiongetWorkers in interface Sessionpublic IsolateSession getWorkerSession(int isolateId)
SessiongetWorkerSession in interface Sessionpublic boolean setExceptionBreakpoint(String exceptionClass) throws NoResponseException, NotConnectedException
SessionsetExceptionBreakpoint in interface SessionNoResponseExceptionNotConnectedExceptionpublic boolean clearExceptionBreakpoint(String exceptionClass) throws NoResponseException, NotConnectedException
SessionclearExceptionBreakpoint in interface SessionNoResponseExceptionNotConnectedExceptionpublic void setLauncher(ILauncher launcher)
SessionsetLauncher in interface Sessionlauncher - ILauncher instance used to launch & terminate the process.public final Object getSyncObject()
Copyright © 2016 The Apache Software Foundation. All rights reserved.