What is Different with the New ABAP Debugger?

The Classic ABAP Debugger loads in the same session as the program. This poses certain technical challenges for debugging ABAP programs.


It also restricts developing a new UI design for the ABAP debugger. To overcome such challenges, SAP introduced the New Debugger. In this blog post, we’ll look at the UI and tools offered with the New Debugger that differ from the Classic Debugger. We’ll also look at the overall layout and the use of sessions.


User Interface and Tools

The New Debugger provides a feature-rich UI that can be customized to display up to four tools in a desktop. The figure below shows the New Debugger with the UI customized to display different tools that show the source code, an internal table, an object, and variables.


New ABAP Debugger


Each tab is called a desktop in the New Debugger, and there are 12 total desktops, with each desktop capable of displaying four tools. Each tool has its own options, as shown in the next figure:

  1. Various desktops
  2. Close tool
  3. New tool
  4. Replace tool
  5. Full screen
  6. Swap tool
  7. Maximize horizontally
  8. Services of the tool

Tool Area


Using the available options for the tool, you can load new tools in the desktop, and replace, swap, and maximize the tool. There are also specific services for the tool that can be accessed using the Services of the Tool icon.


Selecting the New Tool option opens a window, as shown in the next figure. As you can see, the New Debugger provides wider tool support than the Classic Debugger. It also provides some special tools, for example, a tool to debug Web Dynpro applications. Select any tool from the New Tool window to add it to the desktop.


New Debugger Tools


The process to run through the code and analyze data objects is similar to that for the Classic Debugger (using the F5 to F8 function keys). Compared to the Classic Debugger, the Create Watchpoint window, apart from variables, allows you to set watchpoints to monitor changes to object attributes.


Choosing Miscellaneous > Debugger Tips will lead you to various tips to use the New Debugger. We recommend that you go through all the tips to feel comfortable using the New Debugger.


Layout and Sessions

You can save the layout of the New Debugger by choosing Debugger > Debugger Session > Save Layout (see below). This option is useful if you’ve customized the desktop layout with different tools and want to use the result as your default layout.


Save Layout


You can save the current debugging session by choosing Debugger > Debugger Session > Save. This will open the Save Current Debugging Session window, as shown below. You can save the current debug session to a file or to a database by selecting the relevant radio button and providing a name for the session. Optionally, you can also add a comment to identify a saved session easily.


Save Current Debug Session


Different components of the session, such as layout, breakpoints, watchpoints, settings, options and variables, can be saved (see figure above). You can load a saved session by choosing Debugger > Debugger Session > Load, view the saved sessions and delete them by choosing Debugger > Debugger Session > Overview/Delete, and change the names of the desktop tabs by choosing Debugger > Debugger Session > Designation of the User Desktop.


Because the New Debugger opens in a new session, when the application being debugged is ready for input, the external debugger session remains open, and the application screen is presented to the user for input. If any further breakpoint is reached, the debugger loads automatically. This ensures that the debugger doesn’t lose any layout changes or tool arrangements set previously.


To close the external debugger session when the control is returned to the application, use the /hx command in the command bar of the application screen. The debugger can be turned on from any transaction screen using the /h command in the command bar of the SAP GUI screen.


Editor’s note: This post has been adapted from a section of the book Complete ABAP by Kiran Bandari.


Complete ABAP
Complete ABAP

Get everything you need to code with ABAP, all in one place! Are you a beginner looking for a refresher on the basics? You'll get an overview of SAP architecture and learn syntax. Already an experienced programmer and looking to improve your ABAP skills? Dive right into modifications and code enhancements. Understand the programming environment and build reports, interfaces, and applications with this complete reference to coding with ABAP!

Learn More

SAP PRESS is the world's leading SAP publisher, with books on ABAP, SAP S/4HANA, SAP CX, intelligent technologies, SAP Business Technology Platform, and more!