Show TOC

Debugger ScriptingLocate this document in the navigation structure

Use

You use the Debugger Scripting tool to automate manual Debugger input for monotonous Debugger actions. The Debugger script can automate many of your actions. For example, script can execute thousands of Debugger steps or get variable values or change variable values.

You use the script functionality for the following purposes:

  • To change the application context or to change the execution of an application.

    To simulate an authority issue, for example.

  • To analyze complex application context and to present it in an understandable manner.

    To analyze GUIDs, for example.

  • To create custom traces.

    To analyze statement and procedure tracing or branch coverage, for example.

  • To create custom breakpoints and watchpoints.

    To create a breakpoint at a program change, for example.

Integration

Debugger scripting uses the functions within the ABAP Debugger interface. This includes methods such as debug_step( ), get_simple_value( ), or get_ABAP_Stack( ).

The Debugger script is running on the debugger side. Therefore, it can only use the ADI functionality to manipulate the application, but it can cannot directly influence it.

Features

The Debugger Scripting tool consists of the following tab pages:

Script

On the Script tab, the following screen areas are available:

Script

The screen area contains functions for creating, saving, and loading script files. For more information about working with these functions, see Creating and Executing a Script.

Script Editor

The script editor contains the script development environment.

You can create and edit your scripts by using the following functions:

  • To use various services, choose Script Wizard.

    The Script Wizard is a library of Debugging Script Services, which are grouped in categories of services. It contains Breakpoint/Watchpoint services, Debugger Control services, and Write Trace services, for example.

    You insert a service in your code by double-clicking it.

  • To check your program syntax, choose with the quick info text Check.

    For more information, see Checking Programs.

  • To insert source code templates in your script, choose Pattern.

    For more information, see Patterns.

  • To standardize the layout of your script, choose Pretty Printer.

    For more information, see Pretty Printer.

Trigger

You can run the Debugger script only once or you can trigger it by an event.

This triggering event can be a breakpoint in the source code, for example. Whenever the breakpoint is reached, the application stops and the system executes the script.

When the script finishes, the execution of the application continues until the breakpoint is reached again.

For more information, see Creating and Executing a Script.

Display Last Trace

After you have executed a script that produces a trace file, the Display Last Trace screen area appears on the Script tab.

It contains the time stamp of the trace, as well as the following:

  • Function with the quick info text Display Text.

  • with the tooltip text Start Analysis in a New Mode

For more information, see Debugger Tracing.

Trace Files

The tab contains a list of trace files produces by the scripts. It also contains functions for displaying the trace files.

For more information, see Debugger Tracing.