订阅

UiPath Studio

UiPath Studio 指南

断点面板

断点

“断点”用于对可能触发执行问题的活动有意暂停调试流程。设置条件和/或点击计数会将简单断点转变为条件断点。添加日志记录结果会将条件断点转变为条件追踪点。仅添加一条日志记录消息会将断点转变为简单追踪点。

您可以通过以下方法,在任意活动上放置和修改断点:

  • 在上下文菜单中,右键单击活动并选择“切换断点”
  • 选择相应活动,然后单击“调试”选项卡中的“断点”按钮;
  • 选定所需活动后按 F9。

需要选择单个活动,这样才能切换断点。但是,您可以根据需要来切换任何数量的断点。确保设置断点后,工作流中的活动顺序未发生更改。

每个断点或追踪点都会收到基于其状态的特定图标。该图标针对活动设置,可在“断点”面板中查看。

Type

Description

Breakpoints

Breakpoints pause the debugging process before the activity is executed. Breakpoints can have the following states:

Enabled - enabled_breakpointenabled_breakpoint

Disabled - disabled_breakpointdisabled_breakpoint

Conditional Breakpoints

Conditional breakpoints are breakpoints that depend on a set condition and/or a hit count. Conditional breakpoints can have the following states:

Enabled - enabled_conditional_breakpointenabled_conditional_breakpoint

Disabled - disabled_conditional_breakpointdisabled_conditional_breakpoint

Tracepoints

Tracepoints are breakpoints with set logged messages. When the tracepoint is reached during debugging, the message is logged at trace level. Tracepoints can have the following states:

Enabled - enabled_tracepointenabled_tracepoint

Disabled - disabled_tracepointdisabled_tracepoint

Conditional Tracepoints

Conditional tracepoints have a set condition or hit count, and a logged message. The message is logged when the condition is met the number of times stated in the hit count field. Conditional tracepoints can have the following states:

Enabled - enabled_conditional_tracepointenabled_conditional_tracepoint

Disabled - disabled_conditional_tracepointdisabled_conditional_tracepoint

若要修改断点或追踪点的状态,请选择相应活动并按 F9,然后单击“断点”面板中的图标,或使用“设计器”或“断点”面板上下文菜单。您还可单击“调试”选项卡中的“断点”按钮,打开下拉菜单,然后单击“切换断点”

📘

备注:

重新打开自动化项目时,会保留设计期间设定的“断点”。断点不会在运行时保留,仅在调试时保留。

在面板中选择一个断点,然后单击“删除”按钮以将其删除。“删除所有断点”选项用于删除当前项目中的所有断点。“启用所有断点”选项用于启用当前打开的项目中的所有断点。同理,“禁用所有断点”选项则用于禁用所有断点。“断点”面板支持选择多个项目。

断点设置

The Breakpoints panel comes with a set of settings that can be individually adjusted for each toggled breakpoint part of the automation project. Click the settingssettings icon to open the window.

📘

备注:

请注意,“条件”字段中添加的所有表达式均未经过验证。

断点设置的字段说明

“断点设置”窗口包含以下选项:

Option

Description

Condition

The condition for the breakpoint. If the condition is met during debugging, the execution breaks and the activity is highlighted.

Hit Count

Specifies the number of times the condition must be met before the execution breaks. If the hit count is higher than the number of times the condition can be met, the execution does not stop upon encountering the breakpoint. The maximum hit count value is 32,767.

Log Message

Specifies the message to be logged at trace level when the condition is met. The message is visible in the Output panel. If a condition is not set, the message is still logged.

Continue execution when logging

If selected, the execution is not paused when the condition is met and the specified message is logged. Available only if a log message was previously set.

若要查看项目中任何断点的设置,您需要在“设计器”面板中将鼠标悬停在相应断点上。

断点面板

“断点”面板显示当前项目中的所有断点及其所属的文件。“活动名称”列显示切换过断点的活动,“文件路径”列则会显示文件及其位置。

“条件”列显示为断点设置的条件。“日志消息”列显示满足条件时要记录的消息。将鼠标悬停在活动的断点标签上方即可查看断点条件和日志消息。

双击断点即可查看“设计器”面板中高亮显示的活动。使用上下文菜单选项或功能区的“断点”按钮启用或禁用断点。

要删除多个断点,请将其选中,然后单击上下文菜单中的“删除”选项或面板中的“删除”按钮。此操作将从当前文件删除相应断点。

“全部删除”、“全部启用”和“全部禁用”断点按钮会对面板中列出的所有断点执行操作,无论这些断点是否选中。

断点的上下文菜单

右键单击“断点”面板中的项目即可打开上下文菜单,其中包含以下选项:

Option

Description

Delete

Deletes the selected breakpoints.

Focus

Jumps to the breakpoint in the Designer panel.

Enable

Enables the selected breakpoints.

Disable

Disables the selected breakpoints.

Settings

Opens the Breakpoint Settings window for adding a condition to the breakpoint.

📘

备注:

使用“验证文件”或“验证项目”时不会评估断点条件。

Known Limitations in Windows-legacy Projects

Execution does not pause when a breakpoint is hit if the workflow contains:

  • A UI Automation activity where any option is selected for the Wait for page load property.
  • Two variables of different types that are called using the same expression.

约一个月前更新


断点面板


建议的编辑仅限用于 API 参考页面

您只能建议对 Markdown 正文内容进行编辑,而不能建议对 API 规范进行编辑。