Interface IRuntimeDebugClient
-
public interface IRuntimeDebugClient
Describes a 1C:Enterprise runtime debug client. 1C:Enterprise runtime debug clients are defined by extensions. An 1C:Enterprise runtime debug client is defined inplugin.xml
.Following is an example definition of an 1C:Enterprise runtime debug client extension:
<extension point="com._1c.g5.v8.dt.debug.core.runtimeDebugClients"> <client class="com.example.ExampleRuntimeDebugClient" <supportedDebugServers version="com._1c.g5.v8.dt.debug.core.debugServerVersions.8.3.9"></supportedDebugServers> </client> </extension>
Performs debug actions and requests on 1C:Enterprise runtime debug server. Also can be used to receive debug events from 1C:Enterprise runtime debug server, see
ping()
method.Next flow of execution is intended:
configure
client with target debug serverconnect
client with this server- perform debug requests and event dispatching
disconnect
client from target debug serverdispose
client (if no longer needed)
This interface is intended to be implemented and registered by clients.
Clients may use
IRuntimeDebugClientProvider
to get instances of runtime debug client by the target debug sever URL with the appropriate version.- See Also:
IDebugServerVersion
,IRuntimeDebugClientProvider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
attachRuntimeDebugTargets(Collection<UUID> debugTargets)
Attach a collection of 1C:Enterprise runtime debug targets to current debug process.void
configure(String debugServerUrl, UUID debugServerUuid, String infobaseAlias)
Configure this 1C:Enterprise runtime debug client connection with target debug server by given host and port.AttachDebugUIResult
connect(String password)
Connect this 1C:Enterprise runtime debug client to 1C:Enterprise runtime with configured debug server URL and UUID.void
detachRuntimeDebugTargets(Collection<UUID> debugTargets)
Detach a collection of 1C:Enterprise runtime debug targets with current debug process.boolean
disconnect()
Disconnect this 1C:Enterprise runtime debug client from current configured debug server.void
dispose()
Disposes this 1C:Enterprise runtime client.CalculationResultBaseData
evaluateExpression(DebugTargetId debugTarget, int waitTime, RuntimeEvaluationRequest request)
Evaluate the given expression in the 1C:Enterprise runtime debug server.Collection<CalculationResultBaseData>
evaluateExpressions(DebugTargetId debugTarget, int waitTime, Collection<RuntimeEvaluationRequest> requests)
Evaluates the provided evaluation requests in 1C:Enterprise runtime.CalculationResultBaseData
evaluateVariables(DebugTargetId debugTarget, int stackLevel, int maxSize, boolean isMultiLine, int waitTime, UUID expressionUuid, UUID evaluationUuid)
Evaluates the stack frame variables in 1C:Enterprise runtime.List<DebugAreaInfo>
getDebugAreas()
Gets a list of debug areas from 1C:Enterprise runtime debug session.List<DebugTargetId>
getRuntimeDebugTargets(String debugAreaName)
Gets 1C:Enterprise runtime debug targets for the provided debug area name.List<StackItemViewInfoData>
getRuntimeTargetStackFrames(DebugTargetId debugTarget)
Gets a list of stack frames items by the provided 1C:Enterprise runtime debug target.DbgTargetState
getState(DebugTargetId debugTarget)
Get current state of 1C:Enterprise runtime debug target.void
initSettings(boolean suspend)
Initialize the debug session with given settings with remote debug server.RDBGModifyValueResponse
modifyExpression(BslValuePath expressionPath, String expression, DebugTargetId runtimeDebugTarget, int stackLevel, int maxSize, boolean isMultiLine, int waitTime, UUID expressionUuid, UUID evaluationUuid)
Modifies expression on stack frame in 1C:Enterprise runtime.<T> RDBGModifyValueResponse
modifyExpressionTyped(BslValuePath expressionPath, T value, DebugTargetId runtimeDebugTarget, int stackLevel, int maxSize, boolean isMultiLine, int waitTime, UUID expressionUuid, UUID evaluationUuid)
Modifies expression on stack frame in 1C:Enterprise runtime.boolean
notifyInfobaseUpdateFinish()
Notifies the 1C:Enterprise debug server and all connected 1C:Enterprise runtime debug targets about infobase update stop.boolean
notifyInfobaseUpdateStart()
Notifies the 1C:Enterprise debug server and all connected 1C:Enterprise runtime debug targets about infobase update start.List<? extends DBGUIExtCmdInfoBase>
ping()
Pings 1C:Eneteprise runtime to get current events.void
restartRuntimeDebugTarget(Collection<DebugTargetId> debugTargets)
Restarts a collection of provided 1C:Enterprise runtime debug targets.List<DbgTargetStateInfo>
resume(DebugTargetId debugTarget)
Resume debug execution on given 1C:Enterprise runtime target.void
setAutoconnectDebugTargets(List<String> debugAreaNames, List<DebugTargetType> debugTargets)
Sets 1C:Enterprise runtime debug targets for auto-connection with debug client.void
setDebugAreas(List<DebugAreaInfo> areas)
Sets the provided debug areas to the 1C:Enterprise runtime debug session.void
setExceptionBreakpoints(boolean enabled, Iterable<String> exceptions)
Set exception breakpoints in 1C:Enterprise runtime.void
setLineBreakpoints(Map<com._1c.g5.v8.dt.internal.debug.core.model.breakpoints.BslModuleInformation,List<com._1c.g5.v8.dt.internal.debug.core.model.breakpoints.BslLineBreakpointInformation>> modulesBreakpoints)
Sets a collection of line breakpoints to the provided BSL modules.List<DbgTargetStateInfo>
stepInto(DebugTargetId debugTarget)
Step into the provided 1C:Enterprise runtime debug target.List<DbgTargetStateInfo>
stepOver(DebugTargetId debugTarget)
Step over the provided 1C:Enterprise runtime debug target.List<DbgTargetStateInfo>
stepReturn(DebugTargetId debugTarget)
Step return from the provided 1C:Enterprise runtime debug target.void
suspend()
Suspend debug execution.void
terminateRuntimeDebugTargets(Collection<DebugTargetId> debugTargets)
Terminates a collection of provided 1C:Enterprise runtime debug target.void
toggleProfiling(UUID uuid)
Turns profiling mode of debug server on if it's off or turns it off if it's on.
-
-
-
Method Detail
-
configure
void configure(String debugServerUrl, UUID debugServerUuid, String infobaseAlias) throws RuntimeDebugClientException
Configure this 1C:Enterprise runtime debug client connection with target debug server by given host and port.Clients should call this method before all other debug client usage.
- Parameters:
debugServerUrl
- the debug server URL to configure connection, cannot benull
debugServerUuid
- the debug server UUID to configure connection, cannot benull
infobaseAlias
- the infobase alias, cannot benull
- Throws:
RuntimeDebugClientException
- if the request fails
-
dispose
void dispose() throws RuntimeDebugClientException
Disposes this 1C:Enterprise runtime client. This causes the client to cleanup any resources that it maintains.Clients should call this method, when they are finished performing 1C:Enterprise runtime debug sessions with this 1C:Enterprise runtime debug client.
- Throws:
RuntimeDebugClientException
- if the request fails
-
connect
AttachDebugUIResult connect(String password) throws RuntimeDebugClientException
Connect this 1C:Enterprise runtime debug client to 1C:Enterprise runtime with configured debug server URL and UUID.Returns connection state - whether debug client was connected to debug server, not connected or whether authorization is required for this debug server.
After method successful execution client can start perform debug requests and event dispatching.
- Parameters:
password
- the password to use for debug server connection, can benull
if not needed- Returns:
- connection state result - whether debug client was connected to debug server, not connected or
authorization is required for this debug server, never
null
- Throws:
RuntimeDebugClientException
- if the request fails
-
disconnect
boolean disconnect() throws RuntimeDebugClientException
Disconnect this 1C:Enterprise runtime debug client from current configured debug server.After method successful execution client can no longer perform debug requests and event dispatching.
- Throws:
RuntimeDebugClientException
- if the request fails
-
initSettings
void initSettings(boolean suspend) throws RuntimeDebugClientException
Initialize the debug session with given settings with remote debug server.- Parameters:
suspend
- whether need to suspend all 1C:Enterprise debug targets on next line, when they entering 1C:Enterprise runtime- Throws:
RuntimeDebugClientException
- if the request fails
-
attachRuntimeDebugTargets
void attachRuntimeDebugTargets(Collection<UUID> debugTargets) throws RuntimeDebugClientException
Attach a collection of 1C:Enterprise runtime debug targets to current debug process.- Parameters:
debugTargets
- a collection of 1C:Enterprise runtime debug targets UUIDs to attach, cannot benull
- Throws:
RuntimeDebugClientException
- if the request fails
-
detachRuntimeDebugTargets
void detachRuntimeDebugTargets(Collection<UUID> debugTargets) throws RuntimeDebugClientException
Detach a collection of 1C:Enterprise runtime debug targets with current debug process.- Parameters:
debugTargets
- a collection of 1C:Enterprise runtime debug targets UUIDs to detach, cannot benull
- Throws:
RuntimeDebugClientException
- if the request fails
-
resume
List<DbgTargetStateInfo> resume(DebugTargetId debugTarget) throws RuntimeDebugClientException
Resume debug execution on given 1C:Enterprise runtime target.- Parameters:
debugTarget
- the 1C:Enterprise runtime debug target to resume, cannot benull
- Returns:
- a list of actual resumed debug targets, never
null
- Throws:
RuntimeDebugClientException
- if the request fails
-
getState
DbgTargetState getState(DebugTargetId debugTarget) throws RuntimeDebugClientException
Get current state of 1C:Enterprise runtime debug target.- Parameters:
debugTarget
- 1C:Enterprise runtime debug target to get state for, cannot benull
- Returns:
- state of the given 1C:Enterprise runtime debug target, never
null
- Throws:
RuntimeDebugClientException
- if the request fails
-
suspend
void suspend() throws RuntimeDebugClientException
Suspend debug execution. All connected 1C:Enterprise runtime targets will be suspended on next BSL statement execution.- Throws:
RuntimeDebugClientException
- if the request fails
-
stepInto
List<DbgTargetStateInfo> stepInto(DebugTargetId debugTarget) throws RuntimeDebugClientException
Step into the provided 1C:Enterprise runtime debug target.- Parameters:
debugTarget
- 1C:Enterprise runtime debug target to step into, cannot benull
- Returns:
- a list of actual resumed debug targets, never
null
- Throws:
RuntimeDebugClientException
- if the request fails
-
stepOver
List<DbgTargetStateInfo> stepOver(DebugTargetId debugTarget) throws RuntimeDebugClientException
Step over the provided 1C:Enterprise runtime debug target.- Parameters:
debugTarget
- 1C:Enterprise runtime debug target to step over, cannot benull
- Returns:
- a list of actual resumed debug targets, never
null
- Throws:
RuntimeDebugClientException
- if the request fails
-
stepReturn
List<DbgTargetStateInfo> stepReturn(DebugTargetId debugTarget) throws RuntimeDebugClientException
Step return from the provided 1C:Enterprise runtime debug target.- Parameters:
debugTarget
- 1C:Enterprise runtime debug target to step return, cannot benull
- Returns:
- a list of actual resumed debug targets, never
null
- Throws:
RuntimeDebugClientException
- if the request fails
-
terminateRuntimeDebugTargets
void terminateRuntimeDebugTargets(Collection<DebugTargetId> debugTargets) throws RuntimeDebugClientException
Terminates a collection of provided 1C:Enterprise runtime debug target.- Parameters:
debugTargets
- a collection of 1C:Enterprise debug target terminate, cannot benull
- Throws:
RuntimeDebugClientException
- if the request fails
-
setLineBreakpoints
void setLineBreakpoints(Map<com._1c.g5.v8.dt.internal.debug.core.model.breakpoints.BslModuleInformation,List<com._1c.g5.v8.dt.internal.debug.core.model.breakpoints.BslLineBreakpointInformation>> modulesBreakpoints) throws RuntimeDebugClientException
Sets a collection of line breakpoints to the provided BSL modules.- Parameters:
modulesBreakpoints
- a map of BSL-modules breakpoints, key isBslModuleId
, value isBslLineBreakpointInformation
, cannot benull
- Throws:
RuntimeDebugClientException
- if the request fails
-
setExceptionBreakpoints
void setExceptionBreakpoints(boolean enabled, Iterable<String> exceptions) throws RuntimeDebugClientException
Set exception breakpoints in 1C:Enterprise runtime.- Parameters:
enabled
- enable or disable 1C:Eneteprise runtime exception suspendingexceptions
- a list of exceptions, can benull
, then 1C:Eneteprise runtime will suspend on any exception- Throws:
RuntimeDebugClientException
- if the request fails
-
ping
List<? extends DBGUIExtCmdInfoBase> ping() throws RuntimeDebugClientException
Pings 1C:Eneteprise runtime to get current events. 1C:Enterprise runtime debug client must periodically perform this request to inform 1C:Eneteprise runtime, that debug client is still alive.Also client will receive list of actual debug process events.
- Returns:
- a list of events, never
null
- Throws:
RuntimeDebugClientException
- if the request fails
-
getRuntimeDebugTargets
List<DebugTargetId> getRuntimeDebugTargets(String debugAreaName) throws RuntimeDebugClientException
Gets 1C:Enterprise runtime debug targets for the provided debug area name. Current client 1C:Enterprise untime debug area name must be provided if there was selected one in current debug process or can benull
if wasn't.- Parameters:
debugAreaName
- the 1C:Enterprise runtime debug area name, can benull
if nonea
- list of 1C:Enterprise runtime debug targets for current debug area, nevernull
- Throws:
RuntimeDebugClientException
- if the request fails
-
getRuntimeTargetStackFrames
List<StackItemViewInfoData> getRuntimeTargetStackFrames(DebugTargetId debugTarget) throws RuntimeDebugClientException
Gets a list of stack frames items by the provided 1C:Enterprise runtime debug target.- Parameters:
debugTarget
- the 1C:Enterprise debug target, cannot benull
- Returns:
- a list of stack frames, direction of list elements is from lower level to higher, never
null
- Throws:
RuntimeDebugClientException
- if the request fails
-
evaluateExpression
CalculationResultBaseData evaluateExpression(DebugTargetId debugTarget, int waitTime, RuntimeEvaluationRequest request) throws RuntimeDebugClientException
Evaluate the given expression in the 1C:Enterprise runtime debug server. Can return no actual results, then actual result will be returned and dispatched withping()
response event.- Parameters:
debugTarget
- 1C:Enterprise runtime debug target to perform evaluation for, cannot benull
waitTime
- max response waiting timerequests
- the evaluation request to evaluate, cannot benull
- Returns:
- the evaluation result, or
null
, then actual result will be returned withping()
response - Throws:
RuntimeDebugClientException
- if the request fails
-
evaluateExpressions
Collection<CalculationResultBaseData> evaluateExpressions(DebugTargetId debugTarget, int waitTime, Collection<RuntimeEvaluationRequest> requests) throws RuntimeDebugClientException
Evaluates the provided evaluation requests in 1C:Enterprise runtime. Can return no actual results, then actual result will be returned and dispatched withping()
response event.- Parameters:
debugTarget
- 1C:Enterprise runtime debug target to perform evaluation for, cannot benull
waitTime
- the max response waiting timerequests
- a collection of requests to evaluate, cannot benull
- Returns:
- the evaluation result, or
null
, then actual result will be returned withping()
response - Throws:
RuntimeDebugClientException
- if the request fails
-
evaluateVariables
CalculationResultBaseData evaluateVariables(DebugTargetId debugTarget, int stackLevel, int maxSize, boolean isMultiLine, int waitTime, UUID expressionUuid, UUID evaluationUuid) throws RuntimeDebugClientException
Evaluates the stack frame variables in 1C:Enterprise runtime. Returns only local stack frame variables.- Parameters:
debugTarget
- 1C:Enterprise runtime debug target, to perform evaluation for, cannot benull
stackLevel
- stack frames level of evaluationmaxSize
- max size of response value string representationisMultiLine
- whether text result may contain multiple lines. Iffalse
then miltiple line text will be cut at first line breakwaitTime
- max response waiting timeexpressionUuid
- variables-container UUID, cannot benull
evaluationUuid
- result of evaluation UUID, this UUID is needed for event checking, cannot benull
- Returns:
- evaluation result never
null
- Throws:
RuntimeDebugClientException
- if the request fails
-
modifyExpression
RDBGModifyValueResponse modifyExpression(BslValuePath expressionPath, String expression, DebugTargetId runtimeDebugTarget, int stackLevel, int maxSize, boolean isMultiLine, int waitTime, UUID expressionUuid, UUID evaluationUuid) throws RuntimeDebugClientException
Modifies expression on stack frame in 1C:Enterprise runtime. Returns new evaluated value. Method will modify target path expression to given expression resulting value.- Parameters:
expressionPath
- path of expression, instance ofBslValuePath
, cannot benull
expression
- an expression to generate a new value, cannot benull
runtimeDebugTarget
- 1C:Enterprise runtime debug target, to perform evaluation for, cannot benull
stackLevel
- stack frames level of evaluationmaxSize
- max size of response value string representationisMultiLine
- whether text result may contain multiple lines. Iffalse
then miltiple line text will be cut at first line breakwaitTime
- max response waiting timeexpressionUuid
- variables-container UUID, cannot benull
evaluationUuid
- result of evaluation UUID, this UUID is needed for event checking, cannot benull
- Returns:
- evaluation result, can be
null
if request timed out - Throws:
RuntimeDebugClientException
- if the request fails
-
modifyExpressionTyped
<T> RDBGModifyValueResponse modifyExpressionTyped(BslValuePath expressionPath, T value, DebugTargetId runtimeDebugTarget, int stackLevel, int maxSize, boolean isMultiLine, int waitTime, UUID expressionUuid, UUID evaluationUuid) throws RuntimeDebugClientException
Modifies expression on stack frame in 1C:Enterprise runtime. Returns new evaluated value. Method can modify type and value of given expression.- Parameters:
expressionPath
- path of expression, instance ofBslValuePath
, cannot benull
typedModification
- typed modification of expression, cannot benull
runtimeDebugTarget
- 1C:Enterprise runtime debug target, to perform evaluation for, cannot benull
stackLevel
- stack frames level of evaluationmaxSize
- max size of response value string representationisMultiLine
- whether text result may contain multiple lines. Iffalse
then miltiple line text will be cut at first line breakwaitTime
- max response waiting timeexpressionUuid
- variables-container UUID, cannot benull
evaluationUuid
- result of evaluation UUID, this UUID is needed for event checking, cannot benull
- Returns:
- evaluation result, can be
null
if request timed out - Throws:
RuntimeDebugClientException
- if the request fails
-
setDebugAreas
void setDebugAreas(List<DebugAreaInfo> areas) throws RuntimeDebugClientException
Sets the provided debug areas to the 1C:Enterprise runtime debug session.- Parameters:
areas
- a list of debug areas to set, cannot benull
- Throws:
RuntimeDebugClientException
- if the request fails
-
getDebugAreas
List<DebugAreaInfo> getDebugAreas() throws RuntimeDebugClientException
Gets a list of debug areas from 1C:Enterprise runtime debug session.- Returns:
- a list of debug areas, never
null
- Throws:
RuntimeDebugClientException
- if the request fails
-
setAutoconnectDebugTargets
void setAutoconnectDebugTargets(List<String> debugAreaNames, List<DebugTargetType> debugTargets) throws RuntimeDebugClientException
Sets 1C:Enterprise runtime debug targets for auto-connection with debug client.Client 1C:Enterprise runtime debug area names must be provided if there was selected one (or several) in current debug process or can be
null
if wasn't.- Parameters:
debugAreaNames
- list of 1C:Enterprise runtime debug area names, can benull
if nonedebugTargets
- list of 1C:Enterprise runtime debug targets for auto-connection, cannot benull
- Throws:
RuntimeDebugClientException
- if the request fails
-
toggleProfiling
void toggleProfiling(UUID uuid) throws RuntimeDebugClientException
Turns profiling mode of debug server on if it's off or turns it off if it's on.- Parameters:
uuid
- the UUID of profiling session to turn profiling mode on orIDebugConstants.NULL_UUID
to turn off- Throws:
RuntimeDebugClientException
- if the request fails
-
notifyInfobaseUpdateStart
boolean notifyInfobaseUpdateStart() throws RuntimeDebugClientException
Notifies the 1C:Enterprise debug server and all connected 1C:Enterprise runtime debug targets about infobase update start. Retuns whether all debug targets are successfully notified.- Returns:
- whether all debug targets are successfully notified
- Throws:
RuntimeDebugClientException
- if the request fails
-
notifyInfobaseUpdateFinish
boolean notifyInfobaseUpdateFinish() throws RuntimeDebugClientException
Notifies the 1C:Enterprise debug server and all connected 1C:Enterprise runtime debug targets about infobase update stop. Retuns whether all debug targets are successfully notified.- Returns:
- whether all debug targets are successfully notified
- Throws:
RuntimeDebugClientException
- if the request fails
-
restartRuntimeDebugTarget
void restartRuntimeDebugTarget(Collection<DebugTargetId> debugTargets) throws RuntimeDebugClientException
Restarts a collection of provided 1C:Enterprise runtime debug targets. Not all types of 1C:Enterprise runtime debug targets may be restarted.- Parameters:
debugTargets
- a collection of 1C:Enterprise runtime debug targets, cannot benull
- Throws:
RuntimeDebugClientException
- if the request fails
-
-