07-19-2005 9:28 AM
Hi all,
Is there a way to detect that we are in DEBUGGING mode in ABAP code.
I need to determine this, because we have function modules that will be runned in a separate process in the background. If i could detect DEBUG mode, i could choose not to run these modules in the background, making debugging them possible.
Regards,
Rob.
07-19-2005 9:36 AM
Hi Rob,
use fm SYSTEM_DEBUG_BREAKPOINTS with your prog. (sy-repid)
regards Andreas
07-19-2005 9:36 AM
Hi Rob,
use fm SYSTEM_DEBUG_BREAKPOINTS with your prog. (sy-repid)
regards Andreas
07-19-2005 9:50 AM
Hi Rob,
here's another (better as my 1st) possibility:
use structure ABDBG and have a look to that link:
<a href="http://www.abapforum.com/forum/viewtopic.php?t=97&highlight=debug+mode">debug mode</a>
regards Andreas
07-19-2005 9:37 AM
Hi Rob,
If you are in debug mode, then you will be doing an online execution of the program, isn't it? In that case, you can very well use the <b>sy-batch</b> variable.
I don't think there's a separate variable available to detect the debug mode.
Let me know if I have not addressed your problem sufficiently.
Regards,
Anand Mandalika.
07-19-2005 10:20 AM
When you debug a program that calls function modules using the IN BACKGROUND TASK addition, they are processed in a background work process (additional internal session). If you set the In background task: Do not process option, the system collects the function calls, but does not start the background work process. The Debugger assigns a transaction ID, which identifies the background work process uniquely. You can now start the Debugger for the background work process using transaction SM58. You can select the function module concerned here, and then execute it via the Edit menu.
http://help.sap.com/saphelp_47x200/helpdata/en/c6/617d0ce68c11d2b2ab080009b43351/frameset.htm
There is a system variable SY-DEBUG, not sure if it works, though.
Regards,
Subramanian V.
07-19-2005 11:03 AM
Hi all,
Thanx Andreas, your solution is simple and works very fine for me.
Also thanx to Poornanand (SY-BATCH is not usable here, because the actual program is a dialog program, but it will work for background processes)
and thanx to Subramania (SY-DEBUG does not work always, hence my question).
Regards,
Rob