# uts Android debug

HBuilderX 3.6.20+ uni-app uts插件、HBuilderX 4.0+ uni-app-x uts插件,运行到Android,支持Debug调试

# Enable debugging

As shown in the following Gif animation, run the uni-app uts project to Android. After running successfully, click the red bug icon in the HBuilder console, and select [uts debugging] from the drop-down menu to enable the uts debugging function.

Note: uts debugging depends on the uts debugging plug-in, and a pop-up window prompts to install the dependent plug-in. Please be sure to click Install, otherwise you cannot debug.

# Add/remove breakpoint

Open the uts file to be debugged, and right-click or double-click on the code line number to add a breakpoint.

# Debug View

After debugging is enabled, you can see the debugging view in the left view of HBuilderX, as follows:

The debug view is divided into 5 parts:

  • 调试工具栏
  • Variables window (Copy value, Copy expression, Add to watch)
  • Watch window (contains add/edit/delete expressions, and copy value)
  • call stack window
  • Breakpoints window (contains remove/enable/disable breakpoints)

# Debug Actions

  • continue with F8
  • next step F10
  • Enter F11
  • Back to Shift+F11

# Data checking and viewing variables

# Add to watch

In the 【Variable Window】, select the variable and right-click the menu to add the variable to the monitoring window.

# Hover display

During breakpoint debugging, hover the mouse over the variable to be viewed to open the hover window.