測試指令碼以及對其偵錯

This help page is for Desktop Studio. This information is also available for Studio.

測試和偵錯是開發指令碼的一個重要步驟。 在Studio中有幾種方法可以實現此過程:

  • Check for Syntax Errors: You can check your script for syntax errors. Anything found by this tool appears on the tab in Studio. When you save a script, a syntax check automatically runs. Warnings indicate things that you should look at and consider fixing. Errors are critical issues that prevent the script from working. You won't be able to save your script until you correct all errors.
  • 使用模擬互動進行測試:您可以透過在 simulating interactions 中模擬互動Studio來測試指令碼。 這可以讓您看到指令碼在執行中的表現,並診斷需要修復的問題。 您可以對模擬互動進行追蹤,這可以讓您深入了解指令碼執行中的情況。
  • 追踪指令碼Tracing scripts允許您查看指令碼運行時發生的情況。 您可以在實時或模擬互動中使用該功能。 工具向您顯示指令碼中的動作,以及隨著指令碼的進行,輸出如何變化。 您可以看到指令碼中存在的變數以及它們的值。 您還可以看到動作的屬性,包括它們在您追蹤的指令碼中的配置情況。
  • 在 Snippet 中偵錯代碼and Check Syntax :編輯器視窗有 two features,您可以用它來check the code 代碼。 視窗的工作方式就像一個小型追蹤工具,允許您逐行瀏覽代碼。 您可以看到每個變數和它在代碼中該點上的值。