Announcement

Collapse
No announcement yet.

Quirk Question: Compile Type Checking If Debugger

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

  • 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.
    Furcadia, an interesting online MMORPG in which you can create and program your own content.

  • #2
    ???

    #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
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      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.
      Rick Angell

      Comment


      • #4
        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.
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment

        Working...
        X