This is a test message to test the length of the message box.
Login
|
ABAP Tools Work with Eclipse
Created by Software-Heroes

ABAP Tools - Work with Eclipse (Breakpoint)

1072

How do breakpoints in ABAP development tools help you debug more efficiently? Let's look at the different types and what you can achieve with them.

Advertising


In this article, we'll look at the different breakpoints and how you can use them efficiently in your daily work.

 

Introduction

If you're familiar with SE80 as a development environment, there were two different types of breakpoints: the normal breakpoint and an external breakpoint. In most cases, you will have worked with the normal breakpoint to debug reports and other code. Experienced developers also use watchpoints when they don't know exactly where the error actually occurred. With ADT, there are now additional types of breakpoints and analysis options, which we'll look at in this article.

 

Preparation

To prepare, we'll use a debugging class that we already used in our YouTube video. If you'd like to learn more about debugging for beginners, you can find the video linked below. You can generally start with the class if you have your own object at hand. If you're missing additional objects, you can find them in the repository on GitHub.

CLASS zcl_bs_ytb_debug_example DEFINITION
  PUBLIC FINAL
  CREATE PUBLIC.

  PUBLIC SECTION.
    INTERFACES if_oo_adt_classrun.

    TYPES: BEGIN OF sale,
             position    TYPE i,
             description TYPE string,
             value       TYPE p LENGTH 15 DECIMALS 2,
             currency    TYPE waers,
           END OF sale.
    TYPES sales TYPE STANDARD TABLE OF sale WITH EMPTY KEY.

  PRIVATE SECTION.
    METHODS get_table_content
      RETURNING VALUE(result) TYPE sales.

    METHODS raise_a_stacked_exception.

    METHODS raise_and_add_message
      RAISING zcx_bs_ytb_general_failure.

    METHODS raise_an_optional_error
      RAISING zcx_bs_ytb_general_failure.

    METHODS get_json_content
      RETURNING VALUE(result) TYPE string.
ENDCLASS.


CLASS zcl_bs_ytb_debug_example IMPLEMENTATION.
  METHOD if_oo_adt_classrun~main.
    DATA(table_content) = get_table_content( ).

    out->write( table_content ).

    TRY.
        raise_a_stacked_exception( ).
      CATCH cx_root INTO DATA(error).
        out->write( error->get_text( ) ).
    ENDTRY.

    DATA(json_string) = get_json_content( ).

    out->write( json_string ).
  ENDMETHOD.


  METHOD get_table_content.
    RETURN VALUE #( ( position = 1 description = `Ben's computer` value = '100.00' currency = 'USD' )
                    ( position = 2 description = `On little chair` value = '20.99' currency = 'EUR' )
                    ( position = 3 description = `A dishwasher` value = '250.00' currency = 'EUR' )
                    ( position = 4 description = `Used old car` value = '1250.00' currency = 'USD' ) ).
  ENDMETHOD.


  METHOD raise_a_stacked_exception.
    TRY.
        raise_and_add_message( ).
      CATCH zcx_bs_ytb_general_failure INTO DATA(failure).
        RAISE EXCEPTION NEW cx_sy_itab_line_not_found( previous = failure ).
    ENDTRY.
  ENDMETHOD.


  METHOD raise_and_add_message.
    TRY.
        raise_an_optional_error( ).
      CATCH zcx_bs_ytb_general_failure INTO DATA(failure).
        RAISE EXCEPTION NEW zcx_bs_ytb_general_failure( textid   = zcx_bs_ytb_general_failure=>message_specific
                                                        previous = failure ).
    ENDTRY.
  ENDMETHOD.


  METHOD raise_an_optional_error.
    DATA(raise_error) = abap_false.

    IF raise_error = abap_true.
      RAISE EXCEPTION NEW zcx_bs_ytb_general_failure( ).
    ENDIF.
  ENDMETHOD.


  METHOD get_json_content.
    RETURN `{ "Name": "Gerd", "Age": 10, "Child": True }`.
  ENDMETHOD.
ENDCLASS.

 

Breakpoints

The easiest way to set a breakpoint is to right-click on the line number in front of the source code. You can use the first two options to switch between the different breakpoints. Under "Debug Properties..." you'll find additional settings, which are also system-dependent and will be needed later.

 

Breakpoint

The normal breakpoint is displayed in blue and functions like a normal breakpoint. As soon as the code runs through, the debugger opens and you can begin debugging.

 

This type of breakpoint is also an external breakpoint. It also triggers RFC and HTTP calls. By default, debugging is performed for the current user. You can also set it to a different user or a specific terminal using the Debug Properties (see above).

 

Soft Breakpoint

The soft breakpoint is a very special type of breakpoint. In the IDE, it is displayed as a green dot. If the debugger is not active, all soft breakpoints are ignored and the debugger does not start. If the debugger is active and you jump over this type of breakpoint, it works completely normally.

 

This makes the breakpoint perfect if you want to debug longer sections but want to control the debugging via an entry point.

 

Breakpoint View

About the "Breakpoints (Debug)" View provides you with information about all breakpoints set on all open systems.

 

Specific

You can create specific breakpoints via the menu. For example, if you always want to stop when a certain statement is triggered or a certain message is generated. You can also stop at specific exceptions by searching for them in the list.

 

Options

If you click on a breakpoint in the list, you will find further settings at the bottom of the view. For example, you can switch between a normal and a soft breakpoint, or define a condition. If the breakpoint is reached and the condition is met, the program stops. You can also compare the condition with a watchpoint.

 

Conclusion

The ABAP Development Tools now offer additional debugging options beyond what SE80 provides. As more and more applications rely on stateless and HTTP communication, it is also important that these applications remain easy to debug.

 

Further information:
YouTube - ABAP Tools - Debugging for Beginners


Included topics:
ToolsADTEclipseBreakpoint
Comments (0)



And further ...

Are you satisfied with the content of the article? We post new content in the ABAP area every Tuesday and Friday and irregularly in all other areas. Take a look at our tools and apps, we provide them free of charge.


ADT - Metadata Wizard [MIA]

Category - ABAP

In this article, we'll take a look at the Metadata Wizard and how it might simplify your life when creating UI annotations in RAP in the future.

01/16/2026

030: Software-Heroes - My Community

Category - YouTube

Do you want to stay up-to-date with the latest ABAP and SAP knowledge without having to search through every blog individually? My Community brings all community content into a mini-app that you can customize to your liking, so you never miss any news.

12/22/2025

ABAP Tools - IDE Actions (Table)

Category - ABAP

How do you actually create a table and edit it in the IDE Action? Let's look at the input options and how you can ultimately work with the data.

12/09/2025

ABAP Tools - IDE Actions (Side Effects)

Category - ABAP

How can we automatically update information on the UI when something happens with the IDE action? Let's take a closer look at the side effects.

11/18/2025

ABAP Tools - IDE Actions (Value Help)

Category - ABAP

Let's take a detailed look at how we can create a value help for our input for our IDE action in ADT. We'll examine several possibilities and dependencies.

11/11/2025