Skip to main content

Effective Debugging Best Practices in Katalon Studio

This document explains best practices for effective debugging sessions, in Katalon Studio.

As part of debugging, it's common to have a high volume of repetive editing and re-executing. Issues arise when it comes to complex automated tests - manually executing the entire script after every minor code change becomes highly inefficient.

Learn about different debugging modes at Debug a test case in Katalon Studio

Best Practices​

Standard Debug Mode (Using Breakpoints)​

This is the recommended approach for deep code investigation in the Script view.

  1. Set Breakpoint: Open the test case, switch to the Script view, and double-click the leftmost side of the script editor on the line where you want execution to pause. A blue dot indicates a successful breakpoint.
Effective Debugging Best Practices in Katalon Studio image 1
  1. Start Debug: From the main toolbar, click the Debug icon and select your target browser.
Effective Debugging Best Practices in Katalon Studio image 2
  1. Confirm Perspective: When prompted to display the Debug perspective, select Yes.
Effective Debugging Best Practices in Katalon Studio image 3
  1. Navigate Execution: Once paused at the breakpoint, use the Debug toolbar commands to control the flow:

    • Resume: Continues execution until the next breakpoint.

    • Step Into: Enters the function or keyword being called.

    • Step Over: Executes the current line and moves to the next, skipping function entry.

    • Terminate: Stops the debugging session immediately.

Effective Debugging Best Practices in Katalon Studio image 4
  1. Inspect Data: Use the Variables View to track the values of local and global variables, and the Expressions View to evaluate custom data queries.

Debug from here (Advanced Start Point)​

This is the fastest method to jump directly to a specific point in a running test session.

  1. Ensure Persistence: Verify the Project Settings are configured to prevent browser termination.

  2. Launch Session: Run the test case at least once, or use the Open Browser step, to ensure a live browser session is available.

  3. Set Breakpoint: Switch to the Script view and set a breakpoint where you want the execution to pause.

  4. Initiate Debug: Switch to the Manual view, right-click on the step before the intended pause point, and select Debug from here.

  5. Select Instance: Choose the currently running browser instance to start execution from that step.

Effective Debugging Best Practices in Katalon Studio image 5

Conclusion​

By adopting these focused debugging methodologies—particularly leveraging Debug from here to resume existing sessions—your team can significantly reduce the iteration time associated with fixing errors. This structured approach moves beyond simply re-running tests and enables efficient, surgical investigation into the root cause, leading directly to higher quality and more stable automation test cases.

Was this page helpful?