Announcement

Collapse
No announcement yet.

PB CC TRACE Feature

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

  • PB CC TRACE Feature

    I'm impressed by the capabilities of this software -- but I am unable to get the motor started!

    QUESTION::Can someone please tell me who is responsible for that original trace track file, at the time of the beginning of a"NEW" session? Thank you very much!!

  • #2
    What do y0ou mean by "Responsible?"

    The file is opened on the TRACE NEW statement with writing to the file actually starting on TRACE ON.

    Plus, you need to compile with the #TOOLS ON directive (I think).
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Originally posted by Michael Mattias View Post
      Plus, you need to compile with the #TOOLS ON directive (I think).
      Think not, grasshopper. Only know or not know
      #TOOLS defaults to ON
      If the source code contains #TOOLS OFF, all TRACE statements which remain in the program are ignored by the compiler, and the parameters and expressions are excluded from the compiled program.

      Comment


      • #4
        Life is tough! For years folk have harped about Micheal's demeanor and now when he makes a kindly hint that should induce the OP to read the manual he gets called names.
        Rod
        I want not 'not', not Knot, not Knott, not Nott, not knot, not naught, not nought, but aught.

        Comment


        • #5
          Compilable test code..
          ​​​​​​
          Code:
          %DevelopmentCode=-1             ' Any integer 0,,n  REM to turn off TOOLS (ie TRACE, PROFILE etc)
          #IF NOT %DEF(%DevelopmentCode)
            #TOOLS OFF                    ' Don't include any TRACE statements in compilation
           '#ELSE
           '  #TOOLS ON                   ' Not required ~ #TOOLS ON = Compiler Default
          #ENDIF
           
          #COMPILE EXE                    ' PBCC60, PBWin10
          #DIM ALL
           
          #IF %DEF(%PB_CC32)
           #CONSOLE ON
           #BREAK ON
          #ENDIF
          #INCLUDE "win32api.inc"
           
          #IF %DEF(%PB_WIN32)
            MACRO STDOUT = MsgBox
          #ENDIF
          '------------------/
           
          FUNCTION PBMAIN () AS LONG
           LOCAL sTemp AS STRING   :  sTemp = "'Initial Value'"
           
           TRACE NEW "MyTraceFile.txt"    ' (Path) FileName of your choice  (overwrite previous w/same name)
           TRACE ON
           TRACE PRINT "*** TraceTest eg. ***"
           
            ? sTemp
            Modify(sTemp)
           
           TRACE OFF
           
            STDOUT sTemp + $CRLF + "All Finished"
           
           TRACE CLOSE
           
            #IF %DEF(%PB_CC32)
              IF CON.HANDLE THEN
                ? "Any key to exit"
                WAITKEY$
              END IF
            #ENDIF
          END FUNCTION
          '------------------/PBMain
           
          SUB Modify(sTemp AS STRING)
            sTemp = "-> 'Done with sub'"
            TRACE PRINT $Tab + Time$ + " on " + Date$
            TRACE PRINT $Tab + "In Sub ~ Just Checking"
          END SUB
          '------------------/Test
          Rgds, Dave

          Comment


          • #6
            I don't use the PB debugging tools all that often but recently I did a pair of UDP tools for use on my local LAN and the tools were in fact very useful in debugging PB code that was using PB intrinsic UDP code.
            hutch at movsd dot com
            The MASM Forum

            www.masm32.com

            Comment


            • #7
              Sometimes you want to encourage a member to obtain answers by reading the manual but you give him/her a hint where to start looking.

              When materials in the help are, um, shall we say, not on anyone's short list for any of the Pulitzer prizes, sometimes a hint is all you need and want.

              I have zero intention of changing this approach.
              Michael Mattias
              Tal Systems (retired)
              Port Washington WI USA
              [email protected]
              http://www.talsystems.com

              Comment


              • #8
                I don't use the PB debugging tools all that often
                Nor do I, but I find the PB tools helpful when testing/debugging code not written to support testing/debugging. (That would be others' code... I learned my lesson back in the 1980s)

                MCM
                Michael Mattias
                Tal Systems (retired)
                Port Washington WI USA
                [email protected]
                http://www.talsystems.com

                Comment


                • #9
                  Originally posted by Michael Mattias View Post
                  Sometimes you want to encourage a member to obtain answers by reading the manual but you give him/her a hint where to start looking.

                  When materials in the help are, um, shall we say, not on anyone's short list for any of the Pulitzer prizes, sometimes a hint is all you need and want.

                  I have zero intention of changing this approach.
                  Thank you for your understanding,,Michael. You are exactly on the mark.

                  If it matters, I,( the OP,) spent the useful part of several days immersed in the "manual" before I would permit myself the freedom to bother this group, And, it appears, as always, to have come through swimmingly. Thank you sl much guys! Now I need to study your responses

                  Comment

                  Working...
                  X