Show TOC

Starting and Stopping the ABAP Profiler in the DebuggerLocate this document in the navigation structure

Context

Let's assume you want to create an ABAP trace for a source code with a specified start and end position. You can now avail of the option to explicitly switch the measurement function on and off. In particular, you can switch the ABAP Profiler on/off at defined breakpoints when debugging your program. The ABAP Profiler then captures only those source code sections for which you want to analyze the runtime, and not for the entire program execution.

Procedure

  1. Before you launch the debugger, set a breakpoint at that line of ABAP source code that you want to analyze in detail.
  2. Start the Profiler wizard using the menu Start of the navigation path Run Next navigation step Profile ABAP Development Object...  End of the navigation path (shortcut: Alt + F9).
  3. In the wizard page that appears, select the relevant ABAP project and the Object type, and then enter the name of the object for which you want to start the Profiler. In addition, you can specify a specific Trace title for the ABAP trace to be created. Then choose Next.
    On the next page, you can adjust the ABAP Profiler settings to your needs. More on this: Understanding ABAP Profiler Settings
  4. Under the heading When should the trace start? , choose the option Explicitly switch on and off.
    Configuration option for starting ABAP Profiler within the Debugger
    Figure 1: Configuration option for starting ABAP Profiler within the Debugger
  5. Close the Profiler wizard with Finish.
  6. Switch to the Debug perspective - should this be required.
    The execution stops at the specified breakpoint. The breakpoint’s decorator within the ruler indicates that the ABAP Profiler is currently switched off.
    Decorator of the breakpoint
  7. On the ruler, open the context menu and choose Switch ABAP Trace On.
    Context menu of the ruler

    The decorator of the breakpoint now indicates that the ABAP Profiler is switched on.

    Decorator of the breakpoint
  8. When the debugger stops again after stopping at another breakpoint, you have the option to explicitly switch off the ABAP Profiler. To do so, open the context menu on the ruler and choose Switch ABAP Trace Off.
    Note The ABAP Profiler will be switched off automatically when the application is terminated.

Results

As a result of this procedure, the Profiler creates an ABAP trace for the selected development object. You will find it in the ABAP Traces view under the ABAP project and Trace title - as you specified in step 3.