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)

594

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.



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 offer additional options for debugging source code, back when SE80 still did. 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.


ABAP Tools - IDE Actions (Input)

Category - ABAP

How can we retrieve information before the actual IDE action is executed in ABAP? Let's implement the first version of a simple input.

11/04/2025

ABAP Tools - IDE Actions (Output)

Category - ABAP

Let's look at the output options we currently have with IDE Actions and what we can achieve with them. We will look at different implementation examples for each case.

10/28/2025

ABAP Tools - IDE Actions (Creation)

Category - ABAP

Let's create our first IDE action for the ABAP Development Tools together. We'll guide you step by step through the process and the interfaces.

10/24/2025

ABAP Tools - IDE Actions (Introduction)

Category - ABAP

Let's take a look at the basics and a brief introduction to IDE Actions. We'll cover availability and other important details you should know as an ABAP developer.

10/21/2025

Script: ABAP Tools - Update your IDE [014]

Category - YouTube

How can you view your current version in the ABAP Development Tools, find the update settings, and perform an update? In this video, we'll go into the various details.

08/24/2025