[Home]Boost.Build V2/TipsForDebugging

BOOST WIKI | Boost.Build V2 | RecentChanges | Preferences | Page List | Links List

Showing revision 2
Debugging Tips

    bjam --usage-help for the -d parameter

    bjam --debug-building  - enables some debug in .jam files

    ECHO
      echo is the main debugging tool at your disposal.  Safest approach
      to using echo is to place "text in quotes" only, everything else is 
      unquoted. Variables are referenced by $(<variable-name>).  Rules are 
      executed by doing this [ <rule-to-execute> ].
        Examples:
            ECHO "Hello World" ;
            local var = "good bye" ;
            ECHO "var = " $(var) ;
            ECHO "call raw rule from properties object=" [ $(properties).raw ] ;

    Echoing Objects
      The type of object you are dealing with can be discovered by:
          ECHO "object type = " $(variable) ;
        This will output the following iff its an object: 
          object type = object(<class name>)@<n>
                <class name> - examples include file-target and property-set
                <n>          - how many of this object type have been created.

      file-target
        In display the contents of a file-target object do:
            # source-targets == list of file-targets...

            ECHO "source-targets = " [ $(source-targets).str ] ;

                        OR (slightly different information)

            for local i in $(source-targets)
            {
                ECHO $(i) "=" [ $(i).actualize ] ;
            }

      property-set
        To display the contents of this property-set object do:
            ECHO "property-set contents = " [ $(properties).raw ] ;
            Could output:

<debug-symbols>on <exception-handling>on <hardcode-dll-paths>true <inlining>off <install-dependencies>off <link-runtime>shared <link>shared <location>libs <optimization>off <os>CYGWIN <profiling>off <rtti>on <runtime-debugging>on <stdlib>native <symlink-location>project-relative <threading>single <toolset>borland <user-interface>console <variant>debug <xdll-path>/workarea/home_grown/bin/borland/debug

[buy lipitor online] [buy lipitor] [[buy lipitor online]]


BOOST WIKI | Boost.Build V2 | RecentChanges | Preferences | Page List | Links List
Edit revision 2 of this page | View other revisions | View current revision
Edited August 7, 2008 2:00 pm (diff)
Search:
Disclaimer: This site not officially maintained by Boost Developers