Tag Archive Debug

Debugger shortcut to debug popup

Use the file below to trigger the debugger.
For instance in popups, it is not possible to write /h as transaction to debug. Use file below.
Drag the file and drop it in the SAP windows where you want to trigger the debugger.

Download file here : Debugger.sap (ZIP file).
Read More

How to debug a background job ?

In SM37, type JDBG (like Job Debug in Background).

Read More

Debug code executed in update task with infinite loop.

Even with an external break-point, it is not always possible to trigger the debugger for update task.

The tip is to use infinite loop in your code executed in update task, to prevent the code to be debugged from execution, and then, trigger the debugger from SM50.

Infinite loop :


  " ==========================================================
  " Infinite LOOP to retrieve debug in SM50 (background tasks)
  " ----------------------------------------------------------
  DATA lw_x TYPE char1.
  IF sy-uname = 'USERNAME'. " <== Not not lock everybody
    WHILE lw_x IS INITIAL.
    ENDWHILE.
  ENDIF.
  " ==========================================================

Read More