ABAP Forum
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Debug command "Suspend" in Eclipse ADT

Sandra_Rossi
Active Contributor
0 Likes
484

I'm wondering what the debug command "Suspend" is for, when it can be selected, when to use it. Each time I look at the button, it's inactive.

Sandra_Rossi_1-1778868186118.png

Sandra_Rossi_2-1778868311505.png

NB:

Thank you.

Sandra

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
483

The command "Suspend" can be selected in the Eclipse ADT debugger when the debugger is "stepping", i.e. when the debugger has been started (i.e. it has stopped on a first break point) and the code is currently running (i.e. when continuing after a break point and before the next break point, if any).

The command "Suspend" suspends the execution as soon as possible (technical limitations like SQL running, minimal amount of time), anywhere in the code.

One reason to use it is when the code runs for a long time without pausing at one of your breakpoints, and you suspect a performance issue or an endless loop.

One frequent case is that a background job is running for a long time and has to be debugged for analyzing:

  • Start SM51 via Eclipse ADT, select the workprocess and then the menu Process > Program > Debug
  • The debugger starts anywhere in the code
  • You can then check what happens, add breakpoints to better analyze
  • If you continue the job and your breakpoints are still not reached, you may run the command "Suspend" to suspend the execution and start debugging.

Remarks about the "old/new" SAP GUI backend debugger:

  • The command equivalent to "Suspend" was quite exhausting: SM51 > Select the workprocess > menu Process > Program > Debug, and often did not work the second and next times (no idea why, maybe one workaround was to continue the execution by stopping the backend debugger via the menu Debugger > Exit (Application continues running)).
  • "Suspend" was missing because, if I'm not wrong, it was technically impossible because only one process could be active at a moment, either the debugged process or the debuggee process, i.e. when the debugged process was running it was not possible to click a debug option in the debuggee process as its SAP GUI window was inactive.

View solution in original post

1 REPLY 1
Read only

Sandra_Rossi
Active Contributor
484

The command "Suspend" can be selected in the Eclipse ADT debugger when the debugger is "stepping", i.e. when the debugger has been started (i.e. it has stopped on a first break point) and the code is currently running (i.e. when continuing after a break point and before the next break point, if any).

The command "Suspend" suspends the execution as soon as possible (technical limitations like SQL running, minimal amount of time), anywhere in the code.

One reason to use it is when the code runs for a long time without pausing at one of your breakpoints, and you suspect a performance issue or an endless loop.

One frequent case is that a background job is running for a long time and has to be debugged for analyzing:

  • Start SM51 via Eclipse ADT, select the workprocess and then the menu Process > Program > Debug
  • The debugger starts anywhere in the code
  • You can then check what happens, add breakpoints to better analyze
  • If you continue the job and your breakpoints are still not reached, you may run the command "Suspend" to suspend the execution and start debugging.

Remarks about the "old/new" SAP GUI backend debugger:

  • The command equivalent to "Suspend" was quite exhausting: SM51 > Select the workprocess > menu Process > Program > Debug, and often did not work the second and next times (no idea why, maybe one workaround was to continue the execution by stopping the backend debugger via the menu Debugger > Exit (Application continues running)).
  • "Suspend" was missing because, if I'm not wrong, it was technically impossible because only one process could be active at a moment, either the debugged process or the debuggee process, i.e. when the debugged process was running it was not possible to click a debug option in the debuggee process as its SAP GUI window was inactive.