Disable debugging in uniface application

Author: lalitpct@gmail.com (lalitpct)

Application is started with below command which starts debugger and shows all command being executed in client server architceture uniface.exe /asn=uniface.asn /dev=tcp:localhost+120:create ..\usys\udbg.aps Can we 1. Disable debugging . 2.or at least how I can get the command used to start the application in aps?.  If I can get that then in  aps I can put a check if it is being started using debugger.

4 Comments

  1. lalitpct said Can we 1. Disable debugging .

    If you compile all your components using /nodebug (e.g. idf.exe /all /nodebug) then you cannot debug your application. Should there be a need for debugging the application then you need to use a second set of components that are compiled without the /nodebug command line switch. The second option is to use the statement nodebug. But you have to keep in mind that you can simply skip this statement in the Debugger. So this is not really an effective way to disable debugging. You could of course place the nodebug statement in the start-up shell. And then disable debugging just for the start-up shell by compiling it with /nodebug. But you then need some logical or command line option that allows you to enable debugging again (by executing the debug statement in code). Please keep in mind that it's still possible to see the executed Proc when Proc tracing is enabled (ASN setting $proc_tracing=true) even when using the nodebug statement. The only way to prevent this is by compiling everything with /nodebug.

    2.or at least how I can get the command used to start the application in aps?.  If I can get that then in  aps I can put a check if it is being started using debugger.

    AFAIK there's no way to recognize in Proc code if the debugger is running or not. Hope this helps. Daniel


    Author: diseli (daniel.iseli@uniface.com)
  2. diseli said
    lalitpct said Can we 1. Disable debugging .
    If you compile all your components using /nodebug (e.g. idf.exe /all /nodebug) then you cannot debug your application. Should there be a need for debugging the application then you need to use a second set of components that are compiled without the /nodebug command line switch. The second option is to use the statement nodebug. But you have to keep in mind that you can simply skip this statement in the Debugger. So this is not really an effective way to disable debugging. You could of course place the nodebug statement in the start-up shell. And then disable debugging just for the start-up shell by compiling it with /nodebug. But you then need some logical or command line option that allows you to enable debugging again (by executing the debug statement in code). Please keep in mind that it's still possible to see the executed Proc when Proc tracing is enabled (ASN setting $proc_tracing=true) even when using the nodebug statement. The only way to prevent this is by compiling everything with /nodebug.
    2.or at least how I can get the command used to start the application in aps?.  If I can get that then in  aps I can put a check if it is being started using debugger.
    AFAIK there's no way to recognize in Proc code if the debugger is running or not. Hope this helps. Daniel

      Hi Daniel, Thanks for quick response. I tried compiling with nodebug and it works fine , I would like to try the other option also which you have highlighted. i.e compile aps with nodebug and then put a nodebug code in it and that way I can avoid compiling all objects. I added below command in application execute trigger in aps but when we move to screens inside application  I can see code in debugger , Is there any specific location where I need to put the code. nodebug


    Author: lalitpct (lalitpct@gmail.com)
  3. Hi, You are welcome. And thanks for the additional info. But it seems that "nodebug" will only "work" when the Debugger has executed it. It does not seem to be possible to use the workaround I've proposed (using a nodebug start-up shell that runs "nodebug"). ConfusedI guess I should have checked this first before mentioning it here. Sorry for that. Embarassed So in case you really would like to prevent that your application is debugged then the only reliable way is to compile everything with /nodebug. Hope this helps. Daniel


    Author: diseli (daniel.iseli@uniface.com)
  4. may I suggest a brute force way: rename udbg.aps


    Author: ulrich-merkel (ulrichmerkel@web.de)