Announcement

Collapse
No announcement yet.

Quirk Question: Compile Type Checking If Debugger

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Michael Mattias
    replied
    THis appears in the help under ENVIRON$...

    Code:
    IF LEN(ENVIRON$("PBDEBUG")) THEN _
    
      CALL DisplayMyDebugData()
    ... but I cannot find where it says if the Environment variable "PBDEBUG" is set when executing from the stepping debugger. (Like it DOES say the "PBIDE" environment variable is set when executing from the IDE).

    Of course, that is only "kind of like" compile-time. It's not runtime, but the program has already been compiled by the time you start executing. It's "tweener" time I guess.

    Leave a comment:


  • Richard Angell
    replied
    There's the use of #IF as MCM has noted. If you are using PB9 (I did not go back and look at 8) then in the Help, Command Summary\Compiler Operations page are others that may be of use depending on how you may be "debugging". There, in addition to #IF, are #DEBUG CODE and #TOOLS directives which could be used as additional control methods for your needs.

    Leave a comment:


  • Michael Mattias
    replied
    ???

    #IF itself can do this for you
    Code:
    %MY_DEBUG    =  0|1
    
    #IF %MY_DEBUG 
           Code here only compiled when %MY_DEBUG is non-zero
    #ENDIF

    Leave a comment:


  • colin glenn
    started a topic Quirk Question: Compile Type Checking If Debugger

    Quirk Question: Compile Type Checking If Debugger

    Either I'm remembering things wrong, or there is no such compile time variable available in PB to where you could check the status of the compile with a #IF and block out sections of code which don't need to be in the runtime version of the program.
Working...
X