PDSOE: How to detect a session is being debugged

Posted by cverbiest on 26-Feb-2014 05:38

If I run our application from within PDSOE debugger debugger:enabled and debugger:active both return ? . 

How can I detect that code is being debugged .

We have a timer within the application that makes debugging nearly impossible. Each time the trigger fires you loose the context what you are actually debugging.

I'd like to check if debugging is active before activating that timer.

Posted by cverbiest on 26-Feb-2014 06:51

Hi Mike,

Thanks for pointing that out.

I changed my test to :

       if (index(session:startup-parameters + ",", "_debuglauncher.p,") > 0

           and OS-GETENV("ABL_LAUNCH_MODE") = "debug")

           or debugger:enabled

       then /* session being debugged */ .

All Replies

Posted by cverbiest on 26-Feb-2014 06:18

Found a work-around

if index( session:startup-parameters + ",", "_debuglauncher.p,") > 0

then /* session started with PDSOE debugger */.

Posted by Mike Fechner on 26-Feb-2014 06:22

Returns TRUE also for normal RUN from PDSOE.
 

Posted by cverbiest on 26-Feb-2014 06:51

Hi Mike,

Thanks for pointing that out.

I changed my test to :

       if (index(session:startup-parameters + ",", "_debuglauncher.p,") > 0

           and OS-GETENV("ABL_LAUNCH_MODE") = "debug")

           or debugger:enabled

       then /* session being debugged */ .

This thread is closed