studiox
latest
false
UiPath logo, featuring letters U and I in white

StudioX 用户指南

上次更新日期 2024年12月18日

Debugging Your Automation Project

调试是指找出和去除错误,进而使项目正常运行的过程。建议您在自动化项目的设计阶段,针对活动、文件和项目级别执行调试。

Debugging can be performed using several options, defined in the ribbon and explained below.



启动调试

To start debugging your project, click the Debug tab to access the debugging options available in StudioX. You can start the debug process by clicking Debug ribbon button or using F5.

The default action under the Run/Debug ribbon button can be configured from Backstage View > Settings > Design > Run/Debug Default Behavior option. Pick from Debug File, Run File, Debug Project, or Run Project, as the default action when clicking the button.

调试操作

StudioX provides several different actions to help with the debugging process, located in the Debug ribbon tab.



Next Step

Use Next Step to debug activities one at a time. When this action is triggered, the debugger opens and highlights the activity before it is executed. The keyboard shortcut for Next Step is F11.

重试

Retry re-executes the previous activity, and throws the exception if it's encountered again. The activity which threw the exception is highlighted and details about the error are shown in the Debugging panel.

忽略

The Ignore action can be used to ignore an encountered exception and continue the execution from the next activity so that the rest of the project can be debugged.

如要跳过引发异常的活动并继续调试项目的剩余部分,此操作将非常有用。

重启

Restart is available after an exception was thrown and the debug process is paused. The action is used for restarting the debugging process from the first activity of the project.

请注意,如果在使用“从此活动运行”操作后使用此选项,系统便会从先前指定的活动重启调试。

断点

Breakpoints are used to purposely pause the debugging process on an activity which may trigger execution issues. You can set a condition and/or hit count to a simple breakpoint and turn it into a conditional one. Adding logging results turns the conditional breakpoint in a conditional tracepoint. Adding only a logging message transforms the breakpoint to a simple tracepoint.

Read more about Breakpoints and how to use them in our in the StudioX guide.

中断

Break allows you to pause the debugging process at any given moment. The activity which is being debugged remains highlighted when paused. Once this happens, you can choose to Continue, Next Step, or Stop the debugging process.

执行历史记录

The Execution Trail ribbon button is disabled by default. When enabled, it shows the exact execution path at debugging. As the process is executed, each activity is marked in the Designer panel, showing you the execution as it happens:

  • executed activities are marked in green;
  • partially executed activities are marked in orange;
  • activities that threw an exception are marked in red.
  • 未执行的活动不会以任何方式标记;



高亮显示元素

如果启用,则在调试期间高亮显示用户界面元素。该选项可用于常规调试和逐步调试.

日志活动

If enabled, debugged activities are displayed as Trace logs in the Output panel. Note that the Highlight Elements and Log Activities options can only be toggled before debugging, and persist when reopening the automation project.

Logs are automatically sent to Orchestrator if connected, but you can have them stored locally by disabling the Allow Development Logging option from the Robot Settings tab in the Add or Edit user window.

要向 Orchestrator 发送更少量的日志文件,其中一种方法就是禁用“日志活动”

默认情况下,调试器会记录活动,以便每个步骤都出现在“输出”面板中。我们建议维持启用状态,以便更容易地进行跟踪,如下图所示:



继续处理异常

This debugging feature is disabled by default. When disabled in the ribbon, it throws the execution error and stops the debugging, highlights the activity which threw the exception, and logs the exception in the Output panel.

When enabled, the exception is logged in the Output panel and the execution continues.

打开日志

Clicking Open Logs brings up the %localappdata%\UiPath\Logs folder where logs are locally stored. The naming format of log files is YYYY-DD-MM_Component.log (such as 2018-09-12_Execution.log, or 2018-09-12_Studio.log). Read more about logging in the Studio guide.

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo White
信任与安全
© 2005-2024 UiPath。保留所有权利。