public abstract class DebugProcessImpl extends UserDataHolderBase implements DebugProcess
Modifier and Type | Class and Description |
---|---|
class |
DebugProcessImpl.ResumeCommand |
class |
DebugProcessImpl.StepOverCommand |
protected class |
DebugProcessImpl.StopCommand |
Modifier and Type | Field and Description |
---|---|
protected EventDispatcher<DebugProcessListener> |
myDebugProcessDispatcher |
protected Disposable |
myDisposable |
protected EventDispatcher<EvaluationListener> |
myEvaluationDispatcher |
protected CompoundPositionManager |
myPositionManager |
protected MethodReturnValueWatcher |
myReturnValueWatcher |
protected DebuggerSession |
mySession |
protected java.util.concurrent.atomic.AtomicReference<com.intellij.debugger.engine.DebugProcessImpl.State> |
myState |
JAVA_STRATUM
Modifier | Constructor and Description |
---|---|
protected |
DebugProcessImpl(Project project) |
Modifier and Type | Method and Description |
---|---|
void |
addDebugProcessListener(DebugProcessListener listener) |
void |
addEvaluationListener(EvaluationListener evaluationListener) |
void |
addProcessListener(ProcessListener processListener) |
void |
appendPositionManager(PositionManager positionManager)
The usual place to call this method is vmAttachedEvent.
|
boolean |
areBreakpointsMuted() |
ExecutionResult |
attachVirtualMachine(DebugEnvironment environment,
DebuggerSession session) |
protected void |
beforeSuspend(SuspendContextImpl suspendContext) |
void |
cancelRunToCursorBreakpoint() |
boolean |
canGetMethodReturnValue() |
boolean |
canRedefineClasses() |
boolean |
canWatchFieldModification() |
void |
clearCashes(int suspendPolicy) |
protected void |
closeProcess(boolean closedByUser) |
protected void |
commitVM(com.sun.jdi.VirtualMachine vm) |
DebuggerCommandImpl |
createFreezeThreadCommand(ThreadReferenceProxyImpl thread) |
DebuggerCommandImpl |
createPauseCommand() |
SuspendContextCommandImpl |
createPopFrameCommand(DebuggerContextImpl context,
StackFrameProxyImpl stackFrame) |
DebugProcessImpl.ResumeCommand |
createResumeCommand(SuspendContextImpl suspendContext) |
DebugProcessImpl.ResumeCommand |
createResumeCommand(SuspendContextImpl suspendContext,
PrioritizedTask.Priority priority) |
SuspendContextCommandImpl |
createResumeThreadCommand(SuspendContextImpl suspendContext,
ThreadReferenceProxyImpl thread) |
DebugProcessImpl.ResumeCommand |
createRunToCursorCommand(SuspendContextImpl suspendContext,
XSourcePosition position,
boolean ignoreBreakpoints) |
DebugProcessImpl.ResumeCommand |
createStepIntoCommand(SuspendContextImpl suspendContext,
boolean ignoreFilters,
MethodFilter smartStepFilter) |
DebugProcessImpl.ResumeCommand |
createStepIntoCommand(SuspendContextImpl suspendContext,
boolean ignoreFilters,
MethodFilter smartStepFilter,
int stepSize) |
DebugProcessImpl.ResumeCommand |
createStepOutCommand(SuspendContextImpl suspendContext) |
DebugProcessImpl.ResumeCommand |
createStepOutCommand(SuspendContextImpl suspendContext,
int stepSize) |
DebugProcessImpl.ResumeCommand |
createStepOverCommand(SuspendContextImpl suspendContext,
boolean ignoreBreakpoints) |
DebugProcessImpl.ResumeCommand |
createStepOverCommand(SuspendContextImpl suspendContext,
boolean ignoreBreakpoints,
int stepSize) |
DebugProcessImpl.ResumeCommand |
createStepOverCommand(SuspendContextImpl suspendContext,
boolean ignoreBreakpoints,
MethodFilter methodFilter,
int stepSize) |
DebugProcessImpl.StopCommand |
createStopCommand(boolean forceTerminate) |
void |
dispose() |
protected void |
doStep(SuspendContextImpl suspendContext,
ThreadReferenceProxyImpl stepThread,
int size,
int depth,
RequestHint hint) |
com.sun.jdi.ReferenceType |
findClass(EvaluationContext evaluationContext,
java.lang.String className,
com.sun.jdi.ClassLoaderReference classLoader) |
static com.sun.jdi.connect.Connector |
findConnector(boolean useSockets,
boolean listen) |
static com.sun.jdi.connect.Connector |
findConnector(java.lang.String connectorName) |
NodeRenderer |
getAutoRenderer(ValueDescriptor descriptor) |
RemoteConnection |
getConnection() |
DebuggerContextImpl |
getDebuggerContext() |
static NodeRenderer |
getDefaultRenderer(com.sun.jdi.Type type) |
static NodeRenderer |
getDefaultRenderer(com.sun.jdi.Value value) |
ExecutionResult |
getExecutionResult() |
Pair<com.sun.jdi.Method,com.sun.jdi.Value> |
getLastExecutedMethod() |
DebuggerManagerThreadImpl |
getManagerThread() |
CompoundPositionManager |
getPositionManager() |
ProcessHandler |
getProcessHandler() |
Project |
getProject() |
RequestManagerImpl |
getRequestsManager() |
GlobalSearchScope |
getSearchScope() |
DebuggerSession |
getSession() |
SuspendManager |
getSuspendManager() |
VirtualMachineProxyImpl |
getVirtualMachineProxy() |
JavaDebugProcess |
getXdebugProcess() |
com.sun.jdi.Value |
invokeInstanceMethod(EvaluationContext evaluationContext,
com.sun.jdi.ObjectReference objRef,
com.sun.jdi.Method method,
java.util.List<? extends com.sun.jdi.Value> args,
int invocationOptions) |
com.sun.jdi.Value |
invokeMethod(EvaluationContext evaluationContext,
com.sun.jdi.ClassType classType,
com.sun.jdi.Method method,
java.util.List<? extends com.sun.jdi.Value> args)
Is equivalent to invokeInstanceMethod(evaluationContext, classType, method, args, 0)
|
com.sun.jdi.Value |
invokeMethod(EvaluationContext evaluationContext,
com.sun.jdi.ClassType classType,
com.sun.jdi.Method method,
java.util.List<? extends com.sun.jdi.Value> args,
boolean internalEvaluate) |
com.sun.jdi.Value |
invokeMethod(EvaluationContext evaluationContext,
com.sun.jdi.ClassType classType,
com.sun.jdi.Method method,
java.util.List<? extends com.sun.jdi.Value> args,
int extraInvocationOptions,
boolean internalEvaluate) |
com.sun.jdi.Value |
invokeMethod(EvaluationContext evaluationContext,
com.sun.jdi.InterfaceType interfaceType,
com.sun.jdi.Method method,
java.util.List<? extends com.sun.jdi.Value> args) |
com.sun.jdi.Value |
invokeMethod(EvaluationContext evaluationContext,
com.sun.jdi.ObjectReference objRef,
com.sun.jdi.Method method,
java.util.List<? extends com.sun.jdi.Value> args) |
boolean |
isAttached() |
boolean |
isDetached() |
boolean |
isDetaching() |
boolean |
isEvaluationPossible() |
boolean |
isEvaluationPossible(SuspendContextImpl suspendContext) |
boolean |
isInInitialState() |
boolean |
isPausePressed() |
com.sun.jdi.ReferenceType |
loadClass(EvaluationContextImpl evaluationContext,
java.lang.String qName,
com.sun.jdi.ClassLoaderReference classLoader) |
void |
logThreads() |
com.sun.jdi.ArrayReference |
newInstance(com.sun.jdi.ArrayType arrayType,
int dimension) |
com.sun.jdi.ObjectReference |
newInstance(EvaluationContext evaluationContext,
com.sun.jdi.ClassType classType,
com.sun.jdi.Method method,
java.util.List<? extends com.sun.jdi.Value> args) |
void |
onHotSwapFinished() |
void |
printToConsole(java.lang.String text) |
static java.lang.String |
processError(java.lang.Exception e) |
static java.lang.String |
processIOException(java.io.IOException e,
java.lang.String address) |
void |
reattach(DebugEnvironment environment) |
void |
removeDebugProcessListener(DebugProcessListener listener) |
void |
removeEvaluationListener(EvaluationListener evaluationListener) |
void |
removeProcessListener(ProcessListener processListener) |
void |
resetIgnoreSteppingFilters(com.sun.jdi.Location location,
RequestHint hint) |
void |
setRunToCursorBreakpoint(RunToCursorBreakpoint breakpoint)
Deprecated.
|
void |
setSteppingBreakpoint(SteppingBreakpoint breakpoint) |
void |
setWatchMethodReturnValuesEnabled(boolean enabled) |
void |
setXDebugProcess(JavaDebugProcess XDebugProcess) |
void |
showStatusText(java.lang.String text) |
void |
startWatchingMethodReturn(ThreadReferenceProxyImpl thread) |
void |
stop(boolean forceTerminate) |
void |
waitFor() |
void |
waitFor(long timeout) |
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getUserData, putUserData
protected final EventDispatcher<DebugProcessListener> myDebugProcessDispatcher
protected final EventDispatcher<EvaluationListener> myEvaluationDispatcher
protected final java.util.concurrent.atomic.AtomicReference<com.intellij.debugger.engine.DebugProcessImpl.State> myState
protected CompoundPositionManager myPositionManager
protected DebuggerSession mySession
protected MethodReturnValueWatcher myReturnValueWatcher
protected final Disposable myDisposable
protected DebugProcessImpl(Project project)
public Pair<com.sun.jdi.Method,com.sun.jdi.Value> getLastExecutedMethod()
public void setWatchMethodReturnValuesEnabled(boolean enabled)
public boolean canGetMethodReturnValue()
public NodeRenderer getAutoRenderer(ValueDescriptor descriptor)
public static NodeRenderer getDefaultRenderer(com.sun.jdi.Value value)
public static NodeRenderer getDefaultRenderer(com.sun.jdi.Type type)
protected void commitVM(com.sun.jdi.VirtualMachine vm)
public void printToConsole(java.lang.String text)
printToConsole
in interface DebugProcess
public ProcessHandler getProcessHandler()
getProcessHandler
in interface DebugProcess
protected void doStep(SuspendContextImpl suspendContext, ThreadReferenceProxyImpl stepThread, int size, int depth, RequestHint hint)
suspendContext
- stepThread
- size
- the step size. One of StepRequest.STEP_LINE
or StepRequest.STEP_MIN
depth
- hint
- may be nullpublic void showStatusText(java.lang.String text)
public static com.sun.jdi.connect.Connector findConnector(boolean useSockets, boolean listen) throws ExecutionException
ExecutionException
public static com.sun.jdi.connect.Connector findConnector(java.lang.String connectorName) throws ExecutionException
ExecutionException
public void addEvaluationListener(EvaluationListener evaluationListener)
public void removeEvaluationListener(EvaluationListener evaluationListener)
public void addDebugProcessListener(DebugProcessListener listener)
addDebugProcessListener
in interface DebugProcess
public void removeDebugProcessListener(DebugProcessListener listener)
removeDebugProcessListener
in interface DebugProcess
public void addProcessListener(ProcessListener processListener)
public void removeProcessListener(ProcessListener processListener)
public RemoteConnection getConnection()
public ExecutionResult getExecutionResult()
getExecutionResult
in interface DebugProcess
public Project getProject()
getProject
in interface DebugProcess
public boolean canRedefineClasses()
public boolean canWatchFieldModification()
public boolean isInInitialState()
public boolean isAttached()
isAttached
in interface DebugProcess
public boolean isDetached()
isDetached
in interface DebugProcess
public boolean isDetaching()
isDetaching
in interface DebugProcess
public RequestManagerImpl getRequestsManager()
getRequestsManager
in interface DebugProcess
public VirtualMachineProxyImpl getVirtualMachineProxy()
getVirtualMachineProxy
in interface DebugProcess
public void appendPositionManager(PositionManager positionManager)
DebugProcess
appendPositionManager
in interface DebugProcess
positionManager
- to be appendedpublic void setSteppingBreakpoint(SteppingBreakpoint breakpoint)
@Deprecated public void setRunToCursorBreakpoint(RunToCursorBreakpoint breakpoint)
setSteppingBreakpoint(SteppingBreakpoint)
public void cancelRunToCursorBreakpoint()
public void resetIgnoreSteppingFilters(com.sun.jdi.Location location, RequestHint hint)
protected void closeProcess(boolean closedByUser)
public static java.lang.String processError(java.lang.Exception e)
public static java.lang.String processIOException(java.io.IOException e, java.lang.String address)
public void dispose()
public DebuggerManagerThreadImpl getManagerThread()
getManagerThread
in interface DebugProcess
public void waitFor()
waitFor
in interface DebugProcess
public void waitFor(long timeout)
waitFor
in interface DebugProcess
public com.sun.jdi.Value invokeMethod(EvaluationContext evaluationContext, com.sun.jdi.ObjectReference objRef, com.sun.jdi.Method method, java.util.List<? extends com.sun.jdi.Value> args) throws EvaluateException
invokeMethod
in interface DebugProcess
EvaluateException
public com.sun.jdi.Value invokeInstanceMethod(EvaluationContext evaluationContext, com.sun.jdi.ObjectReference objRef, com.sun.jdi.Method method, java.util.List<? extends com.sun.jdi.Value> args, int invocationOptions) throws EvaluateException
invokeInstanceMethod
in interface DebugProcess
EvaluateException
public com.sun.jdi.Value invokeMethod(EvaluationContext evaluationContext, com.sun.jdi.ClassType classType, com.sun.jdi.Method method, java.util.List<? extends com.sun.jdi.Value> args) throws EvaluateException
DebugProcess
invokeMethod
in interface DebugProcess
EvaluateException
public com.sun.jdi.Value invokeMethod(EvaluationContext evaluationContext, com.sun.jdi.ClassType classType, com.sun.jdi.Method method, java.util.List<? extends com.sun.jdi.Value> args, boolean internalEvaluate) throws EvaluateException
EvaluateException
public com.sun.jdi.Value invokeMethod(EvaluationContext evaluationContext, com.sun.jdi.ClassType classType, com.sun.jdi.Method method, java.util.List<? extends com.sun.jdi.Value> args, int extraInvocationOptions, boolean internalEvaluate) throws EvaluateException
EvaluateException
public com.sun.jdi.Value invokeMethod(EvaluationContext evaluationContext, com.sun.jdi.InterfaceType interfaceType, com.sun.jdi.Method method, java.util.List<? extends com.sun.jdi.Value> args) throws EvaluateException
EvaluateException
public com.sun.jdi.ArrayReference newInstance(com.sun.jdi.ArrayType arrayType, int dimension) throws EvaluateException
newInstance
in interface DebugProcess
EvaluateException
public com.sun.jdi.ObjectReference newInstance(EvaluationContext evaluationContext, com.sun.jdi.ClassType classType, com.sun.jdi.Method method, java.util.List<? extends com.sun.jdi.Value> args) throws EvaluateException
newInstance
in interface DebugProcess
EvaluateException
public void clearCashes(int suspendPolicy)
protected void beforeSuspend(SuspendContextImpl suspendContext)
public com.sun.jdi.ReferenceType findClass(EvaluationContext evaluationContext, java.lang.String className, com.sun.jdi.ClassLoaderReference classLoader) throws EvaluateException
findClass
in interface DebugProcess
EvaluateException
public com.sun.jdi.ReferenceType loadClass(EvaluationContextImpl evaluationContext, java.lang.String qName, com.sun.jdi.ClassLoaderReference classLoader) throws com.sun.jdi.InvocationException, com.sun.jdi.ClassNotLoadedException, com.sun.jdi.IncompatibleThreadStateException, com.sun.jdi.InvalidTypeException, EvaluateException
com.sun.jdi.InvocationException
com.sun.jdi.ClassNotLoadedException
com.sun.jdi.IncompatibleThreadStateException
com.sun.jdi.InvalidTypeException
EvaluateException
public void logThreads()
public void onHotSwapFinished()
public SuspendManager getSuspendManager()
public CompoundPositionManager getPositionManager()
getPositionManager
in interface DebugProcess
public void stop(boolean forceTerminate)
stop
in interface DebugProcess
public DebugProcessImpl.StopCommand createStopCommand(boolean forceTerminate)
public GlobalSearchScope getSearchScope()
getSearchScope
in interface DebugProcess
public void reattach(DebugEnvironment environment)
public ExecutionResult attachVirtualMachine(DebugEnvironment environment, DebuggerSession session) throws ExecutionException
ExecutionException
public boolean isPausePressed()
public DebuggerCommandImpl createPauseCommand()
public DebugProcessImpl.ResumeCommand createResumeCommand(SuspendContextImpl suspendContext)
public DebugProcessImpl.ResumeCommand createResumeCommand(SuspendContextImpl suspendContext, PrioritizedTask.Priority priority)
public DebugProcessImpl.ResumeCommand createStepOverCommand(SuspendContextImpl suspendContext, boolean ignoreBreakpoints)
public DebugProcessImpl.ResumeCommand createStepOverCommand(SuspendContextImpl suspendContext, boolean ignoreBreakpoints, int stepSize)
public DebugProcessImpl.ResumeCommand createStepOverCommand(SuspendContextImpl suspendContext, boolean ignoreBreakpoints, MethodFilter methodFilter, int stepSize)
public DebugProcessImpl.ResumeCommand createStepOutCommand(SuspendContextImpl suspendContext)
public DebugProcessImpl.ResumeCommand createStepOutCommand(SuspendContextImpl suspendContext, int stepSize)
public DebugProcessImpl.ResumeCommand createStepIntoCommand(SuspendContextImpl suspendContext, boolean ignoreFilters, MethodFilter smartStepFilter)
public DebugProcessImpl.ResumeCommand createStepIntoCommand(SuspendContextImpl suspendContext, boolean ignoreFilters, MethodFilter smartStepFilter, int stepSize)
public DebugProcessImpl.ResumeCommand createRunToCursorCommand(SuspendContextImpl suspendContext, XSourcePosition position, boolean ignoreBreakpoints) throws EvaluateException
EvaluateException
public DebuggerCommandImpl createFreezeThreadCommand(ThreadReferenceProxyImpl thread)
public SuspendContextCommandImpl createResumeThreadCommand(SuspendContextImpl suspendContext, ThreadReferenceProxyImpl thread)
public SuspendContextCommandImpl createPopFrameCommand(DebuggerContextImpl context, StackFrameProxyImpl stackFrame)
public DebuggerContextImpl getDebuggerContext()
public void setXDebugProcess(JavaDebugProcess XDebugProcess)
public JavaDebugProcess getXdebugProcess()
public boolean areBreakpointsMuted()
public DebuggerSession getSession()
public boolean isEvaluationPossible()
public boolean isEvaluationPossible(SuspendContextImpl suspendContext)
public void startWatchingMethodReturn(ThreadReferenceProxyImpl thread)